I am newbie with android and android studio.
I am following a book to learn android, I want to create a menu for my activity but in the project structure window, I am unable to find the menu folder and the sample menu files.
I attached a screenshot of my Project Explorer:
Whenever you create a Blank Activity in Android Studio, a menu resource directory (i.e. menu resource file i.e. res/menu) and file gets automatically created, with auto-generated code in java class file.
Open your android project in “Project” mode If the project is already opened in the “Android” mode. Step 2: In your project Go to the app > src > main > res as shown in the below image. Step 3: Right-click on the res folder > New > Android Resource Directory as shown in the below image.
Android Studio stores the projects by default in the home folder of the user under AndroidStudioProjects.
Not all folders are created automatically with new projects. If you need it, just press right mouse button while pointers is over res/
folder in your project and select New...
-> Directory
and name it menu
and then you put your menu XMLs inside that folder.
Right-click on res folder → New → Android Resource Directory:
Select "Menu" from resource type:
Click OK:
Following are steps to create Menu folder in res:
Your Menu is created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With