ldpi、mdpi、hdpi 和 xhdpi 屏幕的背景应该是哪种尺寸? [英] Which size should a background be for ldpi, mdpi, hdpi and xhdpi screens?
问题描述
设计师给了我一个背景,可以包含在我的应用程序中.它有很多细节,所以在尝试创建 9-patch 图像时,它变得模糊.
The designer has given me a background to include in my application. It has a lot of detail in it, so when trying to create a 9-patch image, it got blurry.
那么,决定为 Android 设备中的所有主要屏幕密度设置背景,背景图像的确切尺寸应该是多少?
So, deciding to have a background to all major screen densities in Android devices, what should be exactly the background image size?
例如:
- ldpi - 200 x 200
- mdpi - 300 x 300
- hdpi - 400 x 400
我应该遵循什么标准吗?
Is there any standard I should follow?
非常感谢,
费利佩
推荐答案
一般情况下可以这样:
ldpi:240 * 320(小)mdpi:320 * 480(中)hdpi:480 * 800(大)
ldpi: 240 * 320 (small) mdpi: 320 * 480 (medium) hdpi: 480 * 800 (large)
但是,它不会涵盖与屏幕分辨率为 480 * 854 的设备或具有 720*1280 的更新设备有关的很多可能性......
but, it won't cover quite a few possibilities regarding devices with 480 * 854 screen resolution, or newer devices with 720*1280..
你有两个选择:
1) 尝试设计一个可以用作.9 的新背景
1) try to design a new background that can be used as .9
2) 尝试创建多层可绘制对象- drawable 将包含 .9 格式的图像,以及粘合"在其上的所有细节
2) try to create multi-layer drawable - the drawable would consist of image which is in .9 format, and all the details that are "glued" on it
第二种方法需要您的大量工作.在此处阅读有关分层可绘制对象的信息:
the second approach requires quite a work from your side. Read about layered drawables here:
http://developer.android.com/guide/主题/资源/drawable-resource.html#LayerList
这篇关于ldpi、mdpi、hdpi 和 xhdpi 屏幕的背景应该是哪种尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!