With the need to put a mobile Device cloud research issue in the smart terminal for practical testing, I just learned to learn the basics of Android.
Like all framework learning, first I need to learn about the important directory and important files of Android engineering, using the Eclipse IDE to create an Android project, you can see the following directory structure.
1. src/folder: Nothing to say, save all the written Java files
2. gen/folder: The system automatically generate code directory, where the R.java is more important, it identifies the ID and address of various resources in the form of internal classes; By the way, let the system code re-generate automatically when the project is rebuilt--Select the item, and then go to the Eclipse menu bar, Project->clean.
3. assets/folder: The resources required to store the system, you can build any directory inside, but the resource files in the directory will no longer r.java automatically generated ID, the above 2 points and res/folder is different.
4. bin/folder: After build, the APK file will be generated and can be used directly.
5. libs/folder: Store your own jar package, add jar in Eclipse method, find project project file directory, go in and create a new Libs folder, and put the jar package to be imported. Go back to eclipse, (remember to refresh the project first) to the right of the project->propreties->java Bulid path->libraries-> to the right of the add jars-> find the Libs folder under your project , select the jar package you want to import.
6. res/folder: Storage of images, layouts, strings and other resources, the resources in the R.java automatically generated ID (need to tick before project->build automatically), and because of this, in the res can not create a new directory structure.
(1) The res/drawable-*dpi/system extracts the icons in different drawable folders based on the resolution. From H-m-l, in turn, represents the resolution from high to low.
(2) res/layout/store the activity layout file, the new XML file must be named in lowercase.
(3) res/menu/Store the menu resource file. The menu resource file uses the <menu> tag as the root node. In addition, there are two other tabs for setting menu items and grouping, both of which are <item> and <group>.
(4) res/values/store data resource files, can store different types of data. such as Arrays.xml, Colors.xml, Dimens.xml, Styles.xml and so on.
7. Androidmanifest.xml System configuration file (most important)
The total configuration file for the project, documenting the various components used in the application. This file lists the features that the application provides, in which you can specify the services that the application uses (such as telephone service, Internet service, SMS service, GPS service, and so on). In addition, when you add a new activity, you need to configure it in this file, only after the configuration, you can call this activity. Androidmanifest.xml will contain the following settings: Application permissions, activities, intent filters, and so on.
The main directory used for configuration is Res/layout/activityxxx.xml, Androidmanifest.xml
After you understand the directory structure, continue with the next study!
Directory Description for Android engineering