[英]Resizing an image to look the same across all devices
I read the http://developer.android.com/guide/practices/screens_support.html and I understood only a few things. 我阅读了http://developer.android.com/guide/practices/screens_support.html ,我只了解了一些内容。 So, I have an ImageView with
android:src = "@drawable/logo"
. 所以,我有一个带有
android:src = "@drawable/logo"
的ImageView android:src = "@drawable/logo"
。 The logo.png is placed inside my res/drawable-mdpi
and its image-size
is 100x100 pixels. logo.png放在我的
res/drawable-mdpi
,其image-size
为100x100像素。
In what dimensions should I save the image in the following folders, so it can look the same in relation to the screen size across all devices?: 我应该在以下文件夹中将图像保存在哪个维度,因此它在所有设备的屏幕尺寸方面看起来都相同?:
- res/drawable-ldpi
- res/drawable-hdpi
- res/drawable-xhdpi
- res/drawable-xxhdpi
-
res/drawable-ldpi
- res/drawable-hdpi
- res/drawable-xhdpi
- res/drawable-xxhdpi
Simple things. 简单的事情。 Is 75x75, 150x150, 200x200, 300x300, the correct answer?
是75x75,150x150,200x200,300x300,正确答案? Should I bother changing its pixels/inch in my image editor as well?
我也应该在图像编辑器中更改像素/英寸吗?
The magic numbers are 3:4:6:8:12. 神奇的数字是3:4:6:8:12。 Those are the proportions you should use for l:m:h:xh:xxh -dpi image resources.
这些是您应该用于l:m:h:xh:xxh -dpi图像资源的比例。 For example, your launcher icon should be
例如,您的启动器图标应为
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.