Context menu in android is used to open a menu when a Long Click is made on list-view. A menu pop’s up giving options like share, delete, edit,etc,.

In this tutorial i will be showing you the context menu with five different options.

Inserting values into String [ ] and showing these values in list-view, and by long click on thisĀ  values you can get a options menu.



Adding Listview and text view to the xml file.








If you have any query’s in this tutorial let me know through comments below.

Show Buttons
Hide Buttons
Read previous post:
Android Tutorial on SplashScreen