Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

background image size for mobile devices

I want to show a background image in my andriod application.
What is the ideal image size (width and height) to fit in all screen resolutions for mobile?

like image 655
Creativity Paralyze Avatar asked Jun 22 '13 12:06

Creativity Paralyze


2 Answers

id say ideal would be to use the highest screen density so the app will scale it down for lower screen resolutions that way you wont loose quality on bigger screens, heres the chart i got off of here

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
like image 146
JRowan Avatar answered Oct 09 '22 04:10

JRowan


please refer following links..

  • Support multiple screens
  • Best practise
  • testing for multiple screens

This along with @JRowan answer will guide you in proper direction..

like image 38
CRUSADER Avatar answered Oct 09 '22 04:10

CRUSADER