Instructions on how to set menu layout files in Android Studio

WBOY
Release: 2024-04-12 18:34:22
forward
718 people have browsed it

Since the characters you entered appear to contain encoding, direct help may not be available. You can send me a text description of the relevant content so that I can better answer your questions. If you have any difficulties please feel free to let me know.

1. The menu folder is not seen in the Android Studio project.

Android Studio设置menu布局文件的方法说明

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.

Android Studio设置menu布局文件的方法说明

3. However, you will find that the newly created layout file seems strange. You cannot add menu and item, as shown in the following figure:

Android Studio设置menu布局文件的方法说明

2. Processing method

1. After going through it, 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:

Android Studio设置menu布局文件的方法说明

2. Then the following page will appear. Select menu in the Resource type drop-down bar.

Android Studio设置menu布局文件的方法说明

3. Finally, click OK, and the menu folder will come out.

4. Right-click on the menu folder and select as shown below:

Android Studio设置menu布局文件的方法说明

5. Enter the file name and click OK.

The above is the detailed content of Instructions on how to set menu layout files in Android Studio. For more information, please follow other related articles on the PHP Chinese website!

source:zol.com.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!