在Android手机不同的显示分辨率 [英] Different display resolutions on android phones
本文介绍了在Android手机不同的显示分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
应用程序如何确保它看起来任何移动的Android手机上很好(有几个厂家生产,而每个手机都有稍微不同的规格)。
how an application could make sure that it looks good on any mobile Android phone (there are several manufacturers, and each phone has slightly different specifications).
推荐答案
有3种不同的屏幕尺寸。所以你创建了一个名为类似的3个文件夹:
There are 3 different screen sizes. So you create 3 folders named like that:
res/drawable-ldpi/my_icon.png // icon image for low density
res/drawable-mdpi/dpi/my_icon.png // icon for medium density
res/drawable-hdpi/my_icon.png // icon image for high density
和把每个屏幕尺寸的右图像。还可以使用布局:
And put for each screen-size the right images. Also possible with layouts:
res/layout/my_layout.xml // layout for normal screen size
res/layout-small/my_layout.xml // layout for small screen size
res/layout-large/my_layout.xml // layout for large screen size
http://developer.android.com/guide/practices/screens_support.html
这篇关于在Android手机不同的显示分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文