Andorid Supporting Multiple Screens

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

In this document, we can see,

1. Android size<->density configurations

Android 1.5 and earlier versions of the platform were designed to support a single screen configuration — HVGA (320x480) resolution on a 3.2" screen.

Starting from Android 1.6, the platform adds support for multiple screen sizes and resolutions, reflecting the many new types and sizes of devices on which the platform will run. This means that developers must design their applications for proper display on a range of devices and screens.

  • A set of three generalized sizes: large, normal, and small, and
  • A set of three generalized densities: high (hdpi), medium (mdpi), and low (ldpi)

So , obvioulsy , there are 9 possible size<->density configurations.

and my smartq7 is for the large(800x480) & ldpi(133)

2. Android Screen compartiable displaying

  • If the device's screen density is not medium, the application's layout and drawing of its content is as if the screen is medium density, but the framework scales the layout and images (if the image for the target density is not available) to fit the target density. It scales 1.5 times if the target density is high density (160->240 virtual dpi), or 0.75 times if the target density is low density (160 -> 120 virtual dpi).
  • If the device's screen size is small, there are few options options for making Android 1.5 applications work well on such a screen, so Android Market will filter applications that are not known to support these screens from the device.
  • If the device's screen size is large, it limits the application's screen to the normal size and draws a black background around the application. For example, if an application supports high density, but does not support large screens, it only uses a 480x720 area of the screen and the rest will be filled with a black background (see example below).

HVGA, normal size, normal density
[ emulator -skin HVGA ]
WVGA, normal size, high density
[emulator -skin WVGA854 -dpi-device 240]

The application occupies full screen as its considered to be normal size. (close to 480x720)

VGA, large size, medium density
[ emulator -skin 640x480 ]

The application occupies 320x480 of VGA.

SVGA, large size, high density
[ emulator -skin 800x600 -dpi-device 240]

The application occupies 480x720 (=1.5 x [320x480]) of 800x600.

Thisis the reason why Android apps could not display full screen on mySmartq7 lcd !!!

3. Manifest attributes for screens support

Android 1.6 introduced a new manifest element, <supports-screens>, whose attributes you can use to control the display of your application on different classes of device screens. The smallScreens, normalScreens, and largeScreens attributes correspond to the generalized screen sizes shown in earlier .

In general, when you declare a screen-size attribute (smallScreens, normalScreens, or largeScreens) as "true", you are signaling to the platform that your application wants to manage its UI by itself, for all screen sizes, without the platform applying any size-compatibility behaviors (such as a virtual HVGA display area). If you declare a screen-size attribute as "false", you are signaling that your application is not designed for that screen size. The effects are conditioned by the screen size that your application does not support:

The following example shows a manifest that declares support for large, normal, and small screens in any densities.

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizable="true"
android:anyDensity="true" />
</manifest>

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android Preference之android:dependency
  2. Android的Message机制(简单小结)
  3. android back 返回机制的几种解决方案
  4. Material Design之FloatingActionBar
  5. Android之最简单的ImageView加边框方法
  6. android 开发 调用第三方程序
  7. Android DEX反编译后部分代码解析
  8. Android中几种延后处理事件的方法
  9. Android(安卓)JNI开发提高篇
  10. Android笔试题大全(持续更新中)