支持Android上的多个屏幕 [英] Supporting multiple screens on Android

查看:110
本文介绍了支持Android上的多个屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有阅读 DOC 这是漫长的,仍然不明确。

Have read the doc which is lengthy and still not clear.

假设我有大小120像素= * 80px图像,默认MDPI / 160密度下,我还需要prepare

Assuming I have an image with size = 120px * 80px, under the default mdpi/160 density, I also need to prepare

ldpi = 90 * 60
hdpi = 180 * 120
xhdpi = 240 * 160

以上是正确的计算?假设我只有一个单一的布局,所以我需要的是prepare图像,并把它们放到相应的文件夹绘制下,对吧?

Are the calculation above right? Assume I only have a single layout, so what I need is to prepare the images and place them under the corresponding drawable folders, right?

感谢

推荐答案

是的,这些都是正确的大小。

Yes, those are the correct sizes.

是的,只要把你的各种版本在res /绘-LDPI,-mdpi,-hdpi和-xhdpi
文件夹,你就大功告成了。

Yes, just put your various versions in the res/drawable-ldpi, -mdpi, -hdpi, and -xhdpi folders and you're done.

根据您图像的 - 它专门是否还好看自动缩小 - 你可以只提供华电国际和xhdpi版本和Android将在运行时自动缩放它们分别LDPI和MDPI

Depending on your image -- specifically whether it still looks good scaled down automatically -- you could just provide hdpi and xhdpi versions and Android will automatically scale them at run-time for ldpi and mdpi respectively.

这篇关于支持Android上的多个屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆