2 days / 15 talks
Awesome and great blog

January 25-27

android context menu

enero 28, 2021 by 0

alternative actions on the data that is currently displayed -- or/add Remove all existing items from the menu, leaving it empty as if it had Android… Following is the example of handling a context menu item click event using onContextItemSelected() method. Activity#registerForContextMenu and override Define the menu layout in an XML file. Android context menu appears when user press long click on the element. In my onCreate method after having populated the list adapter I use registerForContextMenu(getListView()); to register for a context menu. Now open an activity_main.xml file from \res\layout path and write the code like as shown below,    

Leave a Reply

Your email address will not be published. Required fields are marked *