How to call the context menu in the Android emulator

Creating this tutorial: http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html I have a class based on ListActivity and onCreateContextMenu, onContextItemSelected overrides. I think it looks like a Windows list: right-click on a list item, select the pop-up menu item. However, I do not know how to execute this function in the Android simulator: right-click the ListActivity element and I do not see ContextMenu.

So what should I do in the Android emulator to see the context menu?

+4
source share
2 answers

Long click on the list with the mouse until the options appear.

+6
source

Since Android is designed for hand-held devices, there really is no idea of ​​a right-click. On the hand, the context menu is lifted by the finger, pressing the list item and holding it until it appears. In the simulator, this becomes a mouse click and held.

+6
source

Source: https://habr.com/ru/post/1381296/


All Articles