Android Activity 图片背景大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3694830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android activity image background size
提问by Yash
I am a bit confused on creating an image which will be acting as a background for my activities. So, in short, my aim is that my application should be able to fit the different screen sizes. Therefore, what size in pixel should my three images be to be able to fill the screen of the device in ldpi, mdpi and hdpi?
我对创建一个将作为我活动背景的图像感到有些困惑。所以,简而言之,我的目标是我的应用程序应该能够适应不同的屏幕尺寸。因此,我的三张图像应该以多大的像素为单位才能以 ldpi、mdpi 和 hdpi 填充设备的屏幕?
Thank you for any response.
感谢您的任何回应。
回答by Wroclai
In ldpi
-folder, the recommended size is 240x320.
在ldpi
-folder 中,推荐大小为 240x320。
In mdpi
-folder, the recommended size is 320x480.
在mdpi
-folder 中,建议大小为 320x480。
In hdpi
-folder, the recommended size is 480x800.
在hdpi
-folder 中,推荐大小为 480x800。
More information about this subject can be found here.
可以在此处找到有关此主题的更多信息。
回答by S.M_Emamian
ldpi 240x320.
ldpi 240x320。
mdpi 320x480.
mdpi 320x480。
hdpi 480x800.
hdpi 480x800。
xhdpi 640*960.
xhdpi 640*960。
xxhdpi 960x1440.
xxhdpi 960x1440。
updated Jan,09,2016
2016-01-09 更新
ldpi mdpi hdpi xhdpi xxhdpi xxxhdpi
Launcher And Home 36*36 48*48 72*72 96*96 144*144 192*192
Action Bar And Tab 24*24 32*32 48*48 64*64 96*96 128*128
Notification 18*18 24*24 36*36 48*48 72*72 96*96
Background 240*320 320*480 480*800 768*1280 1080 *1920 1440*2560
updated Sep,23,2016
2016-09-23 更新
@CDrosos thanks.
@CDrosos 谢谢。
This is helpful also: Device Metrics - design.google.com/devices
这也很有帮助:设备指标 - design.google.com/devices
回答by adalpari
04 / 2013 : I have read another specifications in android developers
2013 年 4 月:我阅读了 android 开发人员的另一个规范
xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp
xlarge 屏幕至少 960dp x 720dp 大屏幕至少 640dp x 480dp 普通屏幕至少 470dp x 320dp 小屏幕至少 426dp x 320dp
http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/guide/practices/screens_support.html