|
src-contains the. Java source files for the project. In this example, there is one article : Helloworldactivity.java. The HelloWorld activity.java file is the active source file, and you will write the code for the application sequence in this file . This Java file is listed under the project's package name, in this case the package is named Net.learn2develop.HelloWorld.
Note: Here is the source code of the application, all business logic processing can be found here, although it can also be used in the source code in the object-oriented interface programming, but this way of programming obviously increased the difficulty, so Google recommended interface related to the use of configuration files.
gen-contains a compiler-generated R.java file that references all the resources that can be found in the project. Do not modify this file. All resources in the project are automatically compiled into this class, so you can refer to them using this class.
Note : The R.java file is actually an index file for a resource, and he compiles the files in the Res directory into R files according to the index store, which is intended to be accessed quickly in the program.
Android 4.0 Library-there is a Android.jar file in this entry that contains all the class libraries required for an Android application.
assets-This folder contains all the assets used by the application, such as HTML, text files, databases, and so on.
Note: This file and res are still different, first access is This.getasserts (). Open (URL) gets the stream and then reads the file.
bin-This folder contains the files generated by ADT during the build process. In particular, it will generate an. apk file (Android package): APK is a binary file for Android apps and contains everything you need to run Android apps.
res-This folder contains all the resources used in the application. It also contains a few subfolders:drawable-<resolution>, Layout, and values. The 3rd chapter will further discuss how to support devices with different screen resolution and pixel density.
Note: The main storage picture, style (theme), Layout, constants. The files here will be in Gen's.
The R.java file generates an index for easy application access, and the rules for indexing are: if it is a picture, then the index is the name of the picture and does not need an extension; if it is a layout file, it is the same as the picture; If the component is defined in the layout file, the ID of the component is indexed; , you can define any XML below the folder, but their content defines constants with specific tags, but the tag is the data type, the label is the index, and the label's content is constant. So @string/hello will look up all the sub-files in the values file as defined in
<string name= "Hello" >hello World, helloworldactivity!</string>
In addition, files under Res can be defined by re-filenames to define horizontal, vertical, internationalized, pixel
For example, to use the layout of a horizontal screen can be defined as a folder: With the layout (default) in the same directory under the new Layout-land (horizontal screen); Layout-port (vertical screen); Values-zh (Chinese); VALUES-ZH-RCN (Simplified Chinese); DRAWABEL-ZH-MDPI Chinese when using pictures
proguard.cfg : A configuration file used to confuse code to prevent others from recompiling
Androidmanifest.xml-This is a manifest file for the Android app. In this file, you can specify the permissions required by the application, and you can specify additional attributes such as intent filters, receivers, and so on. This file mainly controls the theme of the application and the display of the activity. In addition, the manifest file is read when the software is installed. the four components of Android (Activity, ContentProvider, Broadcastreceiver, Service) need to be registered in this file The permissions required by the program also need to be declared in this file, for example: Phone, SMS, Internet, access to SD card
|