如何区分 480X800 和 480X854 屏幕。我们可以选择将一张图像放在 hdpi 文件夹中。在我的情况下,480X800 图像不支持 480X854 图像。它在底部显示一个空白区域。有什么想法吗?
编辑:我将图像设置为背景。在我的布局上,我有带边距的透明图像视图。如果我单击图像视图,它会执行一些任务。但在这两个屏幕之间。我可以调整一个值。在另一张照片中,图像被轻微拉伸。那我能做什么呢?你能理解我的问题吗?请帮忙。
您实际上不必区分两者;您应该尽最大努力只支持每种屏幕密度而不是特定的屏幕分辨率。否则,当屏幕分辨率不同的设备出现时,您最终会陷入混乱。这就是为什么我们有九个补丁图像! :)
另请参阅这个问题:
我的 Android 初始屏幕应该采用什么分辨率? https://stackoverflow.com/questions/2561598/what-resolution-should-my-android-splash-screens-be
If you absolutely need to differentiate between the two, you can use the long and notlong http://developer.android.com/guide/practices/screens_support.html#qualifiers resource qualifiers. e.g. WVGA is values-hdpi-notlong
and FWVGA is values-hdpi-long
.
Apparently this isn't correct http://developer.android.com/guide/topics/resources/providing-resources.html#table2, which is all the more reason http://developer.android.com/guide/topics/resources/providing-resources.html#table2 to not differentiate and create generic resources that can handle small changes in resolution.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)