(1):Android architecture;
Application layer (applications), Application framework layer (application framework), System Runtime Layer (librarries), Linux kernel layer (Linux Kernel);
(2) the role of folders in Android projects:
NO. |
Folder |
Describe |
1 |
Src |
Store all. Java source files |
2 |
Gen |
Save the path for the automatically generated code file for the ADT plug-in, where the R.java file will save all resource IDs |
3 |
Assets |
Can store some of the larger resource files in the project (slices, music, fonts, etc.) |
4 |
Res |
Can be stored in the project so resource files, slices, nets, text |
5 |
res\drawable-hdpi |
Save high-resolution picture resources |
6 |
res\drawable-idpi |
Save low-resolution picture resources |
7 |
res\drawable-mdpi |
Save in resolution picture resource |
9 |
Res\layout |
The layout file is stored so that it is used to arrange different display components. |
9 |
Res\values |
Information for storing some resource files, for reading text resources, there are some agreed file names in this folder Arrays.xml: Defining Array Data Colors.xml: Defines the data that represents the color dimens.xml: Define a scale that can be used toobtain these resources using the Resources.getdimension () method String.xml: Defines a string that can be used with resources.getstring () obtained Resources.gettext () method to obtain these resources Styles.xml: Defines the displayed style file |
10 |
Res\raw |
customization of some native files in the directory, such as music, video file format, can be used Resources.getrawresource () method to obtain these resources |
11 |
Res\xml |
user-defined XML file, all files are compiled into the application when the program is run, Resources.getxml () can be used while the program is running Method gets |
12 |
Res\anim |
Used to define an animated object |
(3) the role of files in Android projects:
NO. |
File |
Describe |
1 |
Hello.java |
As the activity program, similar to the main class in a Java program |
2 |
Icon.png |
The picture resource files required in the project, in Drawable-hdpi, drawable-idpi, drawable-mdpi folder to save images in different resolutions |
3 |
Main.xml |
To configure all controls |
4 |
Strings.xml |
To configure all resource information |
5 |
R.java |
This file is a system file that is automatically generated and maintained |
6 |
Androidmanifest.xml |
The main configuration file for Android, which configures individual components or some access rights, etc. |
7 |
Default.properties |
Properties definition file for Android project |
Android Learning first day (Introduction and Basics of Android):