Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There isnt menu folder in android studio project

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:

enter image description here

like image 636
riccardo airone Avatar asked May 08 '16 22:05

riccardo airone


People also ask

What is menu folder in Android Studio?

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.

How do I create a menu resource folder?

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.

Where is the Android Studio folder?

Android Studio stores the projects by default in the home folder of the user under AndroidStudioProjects.


3 Answers

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.

like image 57
Marcin Orlowski Avatar answered Oct 28 '22 01:10

Marcin Orlowski


Right-click on res folder → New → Android Resource Directory:

Select "Menu" from resource type:

Click OK:

like image 34
user6190218 Avatar answered Oct 28 '22 03:10

user6190218


Following are steps to create Menu folder in res:

  1. Right click on res
  2. New --> Android Resource Directory
  3. Name your directory and set Resource type as Menu.

Your Menu is created.

like image 23
RRyan Avatar answered Oct 28 '22 03:10

RRyan