关于android多分辨率中的density和density-independent pixel的区别
来源:互联网 发布:qq农场捕鱼枪升级数据 编辑:程序博客网 时间:2024/06/05 22:44
为何要引入dip?
The reason for dip to exist is simple enough. Take for instance the T-Mobile G1. It has a pixel resolution of 320x480 pixels. Now image another device, with the same physical screen size, but more pixels, for instance 640x480. This device would have a higher pixel density than the G1.
—If you specify, in your application, a button with a width of 100 pixels, it will look at lot smaller on the 640x480 device than on the 320x480 device. Now, if you specify the width of the button to be 100 dip, the button will appear to have exactly the same size on the two devices.
如果定义一个button的宽度是100pixels,在640*480的设备中要比320*480的设备中小的多,而如果定义一个button的宽度为100dip的话,在两个设备中尺寸大小几乎相同
—The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, the baseline density assumed by the platform (as described later in this document). At run time, the platform transparently handles any scaling of the dip units needed, based on the actual density of the screen in use. The conversion of dip units to screen pixels is simple: pixels = dips * (density / 160). For example, on 240 dpi screen, 1 dip would equal 1.5 physical pixels. Using dip units to define your application's UI is highly recommended, as a way of ensuring proper display of your UI on different screens
- 关于android多分辨率中的density和density-independent pixel的区别
- Android屏幕密度(Density)和分辨率的解释
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的解释
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的解释
- Android屏幕密度(Density)和分辨率的解释
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的解释
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- Android屏幕密度(Density)和分辨率的关系
- 从今天(2010-8-23)起,所有解决的问题都在这里进行注明!本地在'E://ZYL/technical data'中
- Tomcat Web.xml配置
- 我的程序生涯
- Sql server 日记 (事物日志死锁时的处理方法)
- Android sensor介绍
- 关于android多分辨率中的density和density-independent pixel的区别
- 一天一点python(FAQ-1)
- dynamic_cast用法
- 十步让你成为一名优秀的Web开发人员
- 警戒
- 网站开发十步曲
- 收藏《JS 事件类型及属性》
- PHP 程序员的调试技术
- ms sql server分页sql语句