Getting Started with Android Basics (1)

1. Basics

Select Android, and fill in the basic information of the project as follows --> Next,
Enter application basic information
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.
Set target device
Select the window type, if there is no special requirement, select the Empty Activity window, and then --> Next
select window
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
insert image description here
After the creation is completed, the main interface of the window displayed is as follows;
Main interface
after the creation is completed, the default layout file activity_main.xml displays Hello World!
The first project is created

2. Project structure

The overall structural characteristics of the Android project after creation are as follows;
project structure
res node file directory structure
res node

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 resolutionsBy default, there are five subfolders, each containing icons of different resolutions
values ​​node Used to save string resources, style resources, size resources, etc.vaues node

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

Guess you like

Origin blog.csdn.net/qq_43775034/article/details/114549316