为不同 dpi 创建可绘制对象的最佳方法是什么 [英] What is the best way to create drawables for different dpi

查看:23
本文介绍了为不同 dpi 创建可绘制对象的最佳方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是先创建 MDPI 可绘制对象,然后在 photoshop 中将其按像素比例按 0.075/1.00/1.50/2 比例缩放还是重新创建每个单独的可绘制对象?

Do you create the MDPI drawable first and just scale it accordinly to the .075/1.00/1.50/2 ratio by pixels in photoshop or do you recreate each individual drawable?

还有,是从高质量图像开始并开始缩小它还是从 MDPI 图像开始然后放大?

Also is it better to start with a high quality image and start scaling it down or start with a MDPI image and just scale it up?

这就是我所做的:

在 photoshop 中创建一个 320x480 比例和 160 分辨率的 mdpi 图像.只需输入 120,160、240 或 320 作为分辨率,即可保存 4 张图像并更改分辨率.

Create a mdpi image in photoshop with 320x480 porportions and 160 as it's resolution. Save 4 images and changing the resolution by simply entering 120,160, 240, or 320 as the resolution.

推荐答案

来自 Android 设计指南:

From the Android design guidelines:

策略

那么在为多个屏幕进行设计时,您从哪里开始呢?一种方法是在基本标准(中等大小,MDPI)下工作,并且为其他桶放大或缩小它.另一种方法是从屏幕最大的设备开始,然后缩放向下并找出您需要在较小的用户界面上做出的妥协屏幕.

So where do you begin when designing for multiple screens? One approach is to work in the base standard (medium size, MDPI) and scale it up or down for the other buckets. Another approach is to start with the device with the largest screen size, and then scale down and figure out the UI compromises you'll need to make on smaller screens.

有关此主题的更多详细信息,请查看支持多屏幕.

For more detailed information on this topic, check out Supporting Multiple Screens.

这篇关于为不同 dpi 创建可绘制对象的最佳方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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