Some netizens have just started Android Studio and are not familiar with the operation of creating a new menu layout file. The following editor will explain the graphic and text steps of creating a new menu layout file in Android Studio. Friends in need can take a look.
1. Problem description
1. The menu folder is not seen in the Android Studio project.
2. If I want to add a menu layout file to the Android Studio project, my initial approach is: right-click on the res folder and select the xml file to add it.
3. However, you will find that the newly created layout file seems strange. You cannot add menu and items, as shown in the figure below:
2. Treatment method
1. After some experience, I learned that the menu layout file must be created under the menu folder. The correct method is as follows. First, right-click on the res folder, and then as shown in the figure below:
2. Then the following page will appear. Select menu in the Resource type drop-down bar.
3. Finally click OK, and the menu folder has come out.
4. Right-click on the menu folder and select as shown below:
5. Enter the file name and click OK.
Friends who still don’t understand the related operations of creating a new menu layout file in Android Studio, don’t miss this article brought by the editor.