5
我想在我的andriod應用程序中顯示背景圖像。
什麼是理想的圖像大小(寬度和高度),以適應移動的所有屏幕分辨率?移動設備的背景圖像大小
我想在我的andriod應用程序中顯示背景圖像。
什麼是理想的圖像大小(寬度和高度),以適應移動的所有屏幕分辨率?移動設備的背景圖像大小
ID說,理想的是使用最高的屏幕密度,因此應用程序將其縮小爲較低的屏幕分辨率這樣你不會鬆動質量上更大的屏幕,繼承人我下車這裏
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
Generalised Dpi values for screens:
ldpi Resources for low-density (ldpi) screens (~120dpi)
mdpi Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)
hdpi Resources for high-density (hdpi) screens (~240dpi).
xhdpi Resources for extra high-density (xhdpi) screens (~320dpi).
Therefore generalised size of your resources (assuming they are full screen):
ldpi
Vertical = 426 * 120/160 = 319.5px
Horizontal = 320 * 120/160 = 240px
mdpi
Vertical = 470 * 160/160 = 470px
Horizontal = 320 * 160/160 = 320px
hdpi
Vertical = 640 * 240/160 = 960px
Horizontal = 480 * 240/160 = 720px
xhdpi
Vertical = 960 * 320/160 = 1920px
Horizontal = 720 * 320/160 = 1440px
px = dp*dpi/160
請參考以下鏈接..
這與@JRowan答案將引導您正確的方向沿..
還提醒,隨着最近發佈的Galaxy S4,你可能要添加xxhdpi支持更寬的密度範圍。 –