Monday, April 30, 2012

Android DPI

http://developer.android.com/guide/practices/screens_support.html

To simplify the way that you design your user interfaces for multiple screens, Android divides the range of actual screen sizes and densities into:
  • A set of four generalized sizessmallnormallarge, and xlarge
  • A set of four generalized densitiesldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high)




Screen characteristicQualifierDescription
SizesmallResources for small size screens.
normalResources for normal size screens. (This is the baseline size.)
largeResources for large size screens.
xlargeResources for extra large size screens.
DensityldpiResources for low-density (ldpi) screens (~120dpi).
mdpiResources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)
hdpiResources for high-density (hdpi) screens (~240dpi).
xhdpiResources for extra high-density (xhdpi) screens (~320dpi).
nodpiResources for all densities. These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen's density.
tvdpiResources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is not considered a "primary" density group. It is mostly intended for televisions and most apps shouldn't need it—providing mdpi and hdpi resources is sufficient for most apps and the system will scale them as appropriate. If you find it necessary to provide tvdpi resources, you should size them at a factor of 1.33*mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi.
OrientationlandResources for screens in the landscape orientation (wide aspect ratio).
portResources for screens in the portrait orientation (tall aspect ratio).
Aspect ratiolongResources for screens that have a significantly taller or wider aspect ratio (when in portrait or landscape orientation, respectively) than the baseline screen configuration.
notlongResources for use screens that have an aspect ratio that is similar to the baseline screen configuration.



Table 3. Various screen configurations available from emulator skins in the Android SDK (indicated in bold) and other representative resolutions.
Low density (120), ldpiMedium density (160), mdpiHigh density (240), hdpiExtra high density (320), xhdpi
SmallscreenQVGA (240x320)480x640
NormalscreenWQVGA400 (240x400)
WQVGA432 (240x432)
HVGA (320x480)WVGA800 (480x800)
WVGA854 (480x854)
600x1024
640x960
LargescreenWVGA800** (480x800)
WVGA854** (480x854)
WVGA800* (480x800)
WVGA854* (480x854)
600x1024
Extra Largescreen1024x600WXGA (1280x800)
1024x768
1280x768
1536x1152
1920x1152
1920x1200
2048x1536
2560x1536
2560x1600

No comments:

Related Posts Plugin for WordPress, Blogger...