how to create option menu in android studio

Hello Guys. Welcome to our new tutorial of how to create option menu in android studio. option menu are the primary menu of android. mainly use this option for search, delete , setting, etc.

please follow the code given below to display Analog clock and Digital clock in android.

  • First Create a new project in Android Studio
  • File ⇒ New Android ⇒ Application Project
  • Then Open src -> package -> MainActivity.java and then add following code :

JAVA (MainActivity.java)

  •  Now Open res -> layout -> activity_main.xml and then add following code :

XML (activity_main.xml)

Output:

Finally, run this project.

This is how the option menu look like.

 

option menu in android

 

option menu in android

 

Add a Comment

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