屏幕适配
来源:互联网 发布:不亦说乎的说的读音 编辑:程序博客网 时间:2024/06/05 06:54
Android手机屏幕总类多,各个同一个布局在不同屏幕上显示效果不一样,所以要针对不同屏幕密度的手机进行适配了。
首先,上官网这部分说明的链接地址http://developer.android.com/guide/practices/screens_support.html
接下来,我来总结一下怎么适配了。
- ldpi (low) ~120dpi
- mdpi (medium) ~160dpi
- hdpi (high) ~240dpi
- xhdpi (extra-high) ~320dpi
- xxhdpi (extra-extra-high) ~480dpi
- xxxhdpi (extra-extra-extra-high) ~640dpi
240dpi w=540,height=960
1.density=240/160=1.5
2.dp=540*160/240=360
3.hdpi 360hdpi
270dpi w=540,height=960
1.density=1.6875
2.dp=540*160/270=320
3.320hdp xhdpi
原谅我体育老师!
0 0
- 【Android 屏幕适配】 屏幕适配
- Android 屏幕适配--屏幕旋转
- COCOS2DX屏幕显示与屏幕适配
- Android屏幕适配-----屏幕尺寸
- Android屏幕尺寸单位/屏幕适配
- 屏幕适配
- 【Android】屏幕适配
- android屏幕适配
- android屏幕适配
- android 屏幕适配
- Android屏幕适配
- Android屏幕适配
- Android屏幕适配
- Android屏幕适配
- android 屏幕适配
- 屏幕适配
- Android屏幕适配
- Android屏幕适配
- Apache Shiro简介
- 归档— NSKeyedArchiver
- Genymotion 问题解决之 镜像下载(二)
- js 多setInterval冲突的解决方法
- 用canvas画一个钟表
- 屏幕适配
- Javascript中apply、call、bind的区别
- 一念執著
- 作品展收获
- Web前端基本用法(一)
- hadoop 兼容问题
- C#线程篇---Windows调度线程准则
- 如何在你的网页快速创建分享功能
- GDB十分钟教程