Android Beginner to proficiency (i)

Source: Internet
Author: User

1.andro system architecture: Linux kernel Layer ( provides driver ), System Runtime Library layer and Android Runtime Library ( provides the main features of A/C + + library, such as Sqlite,opengl,webkit and Dalvik virtual machines ), apply the framework layer, the application layer.

2.android Four components: activities (everything the activity interface can see ), Services (service background runs even if the user exits the app will continue to run), broadcast receivers (Broadcastreceiver can receive foreign broadcast messages) and content providers (provider makes it possible to share data between programs and programs).

3. Project directory File Description:

Src:java code Interface layout file Androidmanifest

Libs: Third-party resource bundles

Values: This folder represents the storage string

Menu: This folder represents the menus file

Drawable: Represents a picture file

Layout: representing the layouts file

4. Program running Process:

Androidmanifest.xml (record activity's main run, equivalent to main)

|

Run the corresponding Java class (inheriting to activity or actionbaractivity) according to the file above

|

Load the corresponding interface resource file (Setcontentview (R.layout.testhello)in the OnCreate method according to the Java class above;

|

Load resource information for a specific values folder based on the contents of the layout file

5. In the XML front-end file and Java back-end code, call the resource format in the Values folder:

R.string.hello_word (Java code gets the string)

@String/hello_word (Get the string in the XML layout file)

The above 2 methods can be followed and so on, such as Id,menu,style and so on

The definition ID method is:android:id= "@+id/button1"

6. Master Log, it provides 5 methods of recording, you can use a custom key and other methods to log information and select a level to filter certain data,

Importing namespaces: ImportAndroid.util.Log;

LOG.V () log.d () log.i () LOG.W () LOG.E ()

Android Beginner to proficiency (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.