Android dip:device-independent Pixel Graphics DesignHow Android Supports Device displays:ui Design and UXDevice Display concepts:size, Density, Orientation, DIPSize TypeSmall,Normal,Large,Extra Large,Extra Extra LargeScreen density
The number of physical pixels contained in a one inch area of a given device ' s display screen
Density type
Low or ldpi, Medium or MDPI, TV or tvdpi, High or HDPI, extra High or XHDPI and xxhdpi
Density independence:creating Similar User experiences Android multi-screen support Via <supports-screens& Gt Tag
In manifest:<supports-screens android:largescreens= "true" android:xlargescreens= "true"/>
Providing device-optimized User Interface Layout DesignsUsing Android ' s smallestwidth screen Configuration ModifierTakes the format SW#DP
Use this format to make screen judgments, using different XML files.
720 DIP, then you would use this qualifier to create the Layout resource folder NAMED/RES/LAYOUT-SW720DP to hold your use R interface Layout definition XML files for your app ' s activities
Using the Available screen Width screen Configuration Modifier
W#DP (EXAMPLE:W480DP): Different layouts (depending on the visible width) of the screen switch
No need to focus on both direction and screen size: This is due to the fact that even on the larger tablet devices, and you often don ' t want to use the same MULTIPL e pane UI Layout design for the portrait orientation as to the landscape orientation. With the width screens configuration modifier, you can use something like W640DP to specify a 640 DIP minimum available SCR Een area width for your layout, instead of have to implement both the screen size qualifier and orientation qualifier.
Using the Available screen Height screen Configuration Modifier
H#DP (EXAMPLE:H600DP)
Providing device-optimized Image drawable Assets resource matching process
No density-matching assets can be located in your/res/drawable folders, Android would use your default assets, which is K EPT in the/res/drawable folder; If none is found there, Android would use the MDPI density resources in the/res/drawable-mdpi folder, and would then scale These up or down as needed-match the current-screen size and density.
Author experience
I Keep only XML definitions for things like animations and transitions in this/res/drawable folder, and then keep all of My pixel-based digital imaging assets in those various density-specific/res/drawable-dpi folders.
This folder does not, go to other folders to find, and then proportionally scaled.res/drawable-nodpi
No scale
/RES/DRAWABLE-LAND-HDPI would contain landscape hdpi assets
The Displaymetrics class:size, Density, and Font Scaling
Package:android.util
Display physical size in both the X and Y dimensions
Displaymetrics currentdevicedisplaymetrics = new Displaymetrics (); Getwindowmanager (). Getdefaultdisplay (). Getmetrics (Currentdevicedisplaymetrics);
Displaymetrics: Parameters
Optimizing Android Application Icons for ldpi to xxxhdpi Installing the New App Icon in the Correct Density Folde RS Configuring the Androidmanifest.xml for Custom App Icon