What is a long press keyboard shortcut in Android Emulator?

I am wondering what should be the long print keyboard shortcut in the Android emulator? I have a list of items. I created a function to remove an item if you long press on an item. But I cannot check in my emulator. If I press the mouse button for a long time, you fire the click event.

+3


source to share


2 answers


Please see your code because long mouse click is long press / click in emulators.



+6


source


make sure you don't forget to add a long click for your button.

eg.



button.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
    Toast.makeText(ctx, "hello hello ", Toast.LENGTH_SHORT).show();
    return true;
}

      

as shown here

0


source







All Articles