Android Layout analyze

Source: Internet
Author: User

Adapter
Api
Entity
Handler
Ui
Until
Widgets
Appcontent.java

*************************************
Image:
Drawable: Storing various bitmap files (. png,.jpg,.9png,.gif, etc.) in addition to some other drawable types of XML files
MIPMAP-HDPI: High resolution, general we dropped the picture here.
MIPMAP-MDPI: Medium resolution, rarely, unless the compatible phone is very old
MIPMAP-XHDPI: Ultra-high resolution, mobile phone screen material more and more good, later estimated will slowly transition here
MIPMAP-XXHDPI: Ultra-high resolution, this is reflected on the high-end machine

Layout:
Layout: This directory is stored in our layouts, and on some specific models,
We do screen fitting, like 480*320, and we'll create a different set of layouts,
Just fine: layout-480x320 such a folder!

Menu Resources:
Menu: In the past there are physical menu buttons, that is, the menu button on the phone, with more, now not much,
menu items related to the resource XML can be written here, do not know whether Google will be a new thing to replace the menu ~


Next, the values directory:
Demens.xml: Defining Dimension Resources
String.xml: Defining String Resources
Styles.xml: Defining Style resources
Colors.xml: Defining Color Resources
Arrays.xml: Defining Array Resources
Attrs.xml: Custom controls are used when customizing the control's properties!
Theme theme files are similar to styles, but will work for actvitiy or assigned activity throughout your application.
Usually change the appearance of the window! Can be used in Java code through Settheme,
or add theme properties for <application...> in Androidmanifest.xml!
PS: You may have seen such values directory: Values-w820dp,values-v11, the former W for the tablet device, 820DP for the screen width;
And V11 this represents in the API (11), that is, Android 3.0 will be used!


*************************************************************************************************************** *************
All of our resource files generate a resource ID under the R.java file, and we can use this resource ID to complete resource access.

There are two types of usage: Java code used in and XML code used.

Android Layout analyze

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.