The Learning Path of Android (iv) The learning of inventory files in the project and the frequently used display units in Android

Source: Internet
Author: User

1. The so-called manifest file is the Androidmanifest.xml file in the project. This file is, however, of great use. Analogy: The app's name, icon. App supports the version number of the app's package name and so on. I'll show you the role of each of the parameters in this list file below.

<manifest xmlns:android= "http://schemas.android.com/apk/res/android" namespace  package= "Com.example.hello" Package name uniquely identifies an app android:versioncode= "1" version number    android:versionname= "1.0" version number name   android:icon= "@drawable/ic_ Launcher "app icon. To access the Drawable constants of the R.java file, use the icon's ic_launcher under this constant as the app icons  android:label= "@string/app_name" app name < Activity has multiple activity in an application. An activity represents a form            android:name= "com.example.hello.MainActivity" This package Com.example.hello under the Mainactivity            Android:label= the title <intent-filter> Intent filter of the "@string/app_name" >activity form            specifically matches the intent. Filtering data                <action android:name= "Android.intent.action.MAIN"/> Action name                <category android:name= " Android.intent.category.LAUNCHER "/>            </intent-filter>  </activity>   android: Minsdkversion= "8" specifies the lowest version number supported by the app        android:targetsdkversion= "/>" the highest version number
Display units in 2.android

1..PX (pixels) The general HVGA represents 320*480 pixels, which is used much more
2..dip or DP (device independent pixels). This has something to do with device hardware. Generally in order to support WVGA,QVGA and HVGA recommend this, do not rely on pixels
3..SP (proportional pixels) primarily handles the size of the font. Ability to adapt to the font of the system.
In addition to the above 3, there are several less frequently used, in (feet), mm (mm), pt (point) 1/72 inch
In order to adapt to different resolutions, the pixel density is different. It is recommended to use dip. Text using SP,




The Learning Path of Android (iv) The learning of inventory files in the project and the frequently used display units in Android

Related Article

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.