如何让自己开发的android支持多种不同的手机屏幕(supporting Multiple Screens)
来源:互联网 发布:软件项目风险分析报告 编辑:程序博客网 时间:2024/05/16 12:23
转换式为:px=dp*(dpi/160)
其中px为最终显示的像素数目;dp为density-independent pixel,即A virtual pixel unit that you should use when defining UI layout, to express layout dimensionsor position in a density-independent way. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which isthe baseline density assumed by the system for a "medium" density screen. At runtime, the systemtransparently handles any scaling of the dp units, as necessary, based on the actual density of thescreen in use. The conversion of dp units to screen pixels is simple:
px = dp * (dpi / 160)
证明:设两个不同屏幕上的一段等长距离a,原始图对应width值为dp,目标屏幕密度为dpi,最终在屏幕显示的像素数目为x,则有a=dp/160=x/dpi。变形即有所示转换式。
原文链接
- 如何让自己开发的android支持多种不同的手机屏幕(supporting Multiple Screens)
- Android开发兼容不同分辨率设备的资源命名方法(Supporting Multiple Screens )
- Android 支持不同的屏幕 Supporting Different Screens
- 安卓初学-让APP支持不同的屏幕(Supporting Different Screens)
- Supporting Multiple Screens(支持Android各种屏幕尺寸)
- 支持多种屏幕Supporting Multiple Screens---Develop ---API Guides ---Best Practices
- The Android Evolution of Supporting Multiple Screens
- Android API Guides---Supporting Multiple Screens
- 支持不同屏幕(Supporting Different Screens)
- Supporting Multiple Screens
- Supporting Multiple Screens 翻译
- Supporting Multiple Screens
- Supporting Multiple Screens
- Supporting Multiple Screens
- Supporting Multiple Screens
- Supporting Multiple Screens
- Supporting Multiple Screens
- Androi Supporting Multiple Screens
- .Net下的 ORM框架介紹
- BlackBerry PlayBook NDK 2.0已经正式发布。
- WinXP-32bit下安装mongodb
- IDE二三事: 性能差是一种美德, Bug是一种Feature
- 申请linux邮件列表
- 如何让自己开发的android支持多种不同的手机屏幕(supporting Multiple Screens)
- BlackBerry PlayBook NDK 2.0样例分析之“HelloWorldConsole”
- Ext入门学习系列五--表格控件
- 32位寄存器与64位寄存器
- 88行代码实现俄罗斯方块游戏(含讲解)
- MKV的相关知识
- Unity3D的执行机制
- FFMPEG框架代码阅读
- java_xml读取写入方法