Android Popup Menu ExampleAndroid Popup Menu displays the menu below the anchor text if space is available otherwise above the anchor text. It disappears if you click outside the popup menu. The android.widget.PopupMenu is the direct subclass of java.lang.Object class. Android Popup Menu ExampleLet's see how to create popup menu in android. activity_main.xmlIt contains only one button. File: activity_main.xml popup_menu.xmlIt contains three items as show below. It is created inside the res/menu directory. File: poupup_menu.xml Activity classIt displays the popup menu on button click. File: MainActivity.java Output:Next TopicAndroid Service Tutorial |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India