Android tutorial to learn how to create menu in Android using XML. This code will show how to create menu in android, how to perform action when we click on menu item and how to set icon in menu item but using only XML file. In next tutorial, you all can learn to do this with Java code only.
Just create a new project and give "rl" id to layout or paste below code in layout-> your main XML file
Now open menu(res->layout->menu) folder and create test_menu.xml file and create menu items or paste below code:
Java code with description is given below. Open Main Java file and paste below code:
Not getting the above android tutorial? Comment below, i will solve your problem related to this android menu example tutorial. Share if you like above code.
★ Create Menu using Java
★ Access Call, Dialer Screen, Camera and Web pages
★ Open Second Activity using Intent
★ Make any column invisible in Table layout
★ Create a Dialog box