Getting Started with Android

Source: Internet
Author: User

1, Catalogue

Gen: Put R.java, save ID, automatically maintained by development tools

Res: Put the resource file, the resources will be added automatically in R.java, and give an ID

Androidmainfest.xml: Configuration of the application

Inside some syntax such as: @string/app_name, can be understood as: @ for R.java file, inner class string inside the constant app_name

2, the compilation process

. java--->.class---->dx-->.dex---> Package signature--->.apk

ADB install c:\xx.apk

3, startup process

Create a process---> create the main thread--instantiate activity (via reflection) in the main thread--->

(The operating system stores information about the application (context) in the activity and then calls OnCreate ())

Display units used by the 4,android

PX (pixel) pixels

Dip or DP (device independent pixel) devices independent pixels

SP (scaled pixel) proportional pixels

Main processing font size, according to the system font adaptive

Note: For use with different resolutions, different pixel densities, dip is recommended, text uses SP

Getting Started with Android

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.