1. Basics
Select Android, and fill in the basic information of the project as follows --> Next,
set the dialog box of the target device, mainly to set the current application to run on the device, the default is to run on the phone and tablet, and the Phone and Tablet is checked by default. Can.
Select the window type, if there is no special requirement, select the Empty Activity window, and then --> Next
mainly specify the name of the created Activity and the name of the layout file,After the setting is complete, click finish to complete the creation
After the creation is completed, the main interface of the window displayed is as follows;
after the creation is completed, the default layout file activity_main.xml displays Hello World!
2. Project structure
The overall structural characteristics of the Android project after creation are as follows;
res node file directory structure
node name | effect |
---|---|
drawable node | Store bitmap files (PNG, JPEG, GIF),9 Patch image files (images generated using the 9 Patch tool), Shape Drawable, Drawable object and other XML resource files; |
layout node | Used to store the layout files in the android program (used to display those contents in the control window |
mipmap node | Used to save the launch icon of the application in the projectThere are five subfolders for icons of different resolutions |
values node | Used to save string resources, style resources, size resources, etc. |
The difference between Drawable and mipmap
- 9-Patch pictures and Shape resource files can only be placed in the drawable directory
- Images that need to adapt to the screen resolution are recommended to be placed in mimap, which can improve performance and occupy less memory.
Note:This project was created in the Idea software environment, not Android Studio