Android Background Image Size in Pixel

Android background image size in pixel

there is no full list of screen resolutions, there are no fixed values in pixels for ldpi, mdpi, hdpi,xhdpi and xxhdpi. Every android device may have different resolution. If you want to fill all resolutions you will have to create too many images. If you put them in your app, it will make the app size huge. Maybe a better approach is to use composite image for background.

Background image size for all screens

Android devices' screen sizes in pixels and screen width in inches, can differ significantly from device to device.
To address this issue, google lets you use different resources per size/density category
See here for some more info.

Generally speaking, you must put the largest size image that you want to support for each dpi in the correct folder, and let android do the resizing.

You can also check the imageView's ScaleType attribute to choose how to scale the image to fit the view.

EDIT

the reason to use the different folders and not just one large image is that the larger the image, the more memory it consumes.
For example a 1920x1280 image is nice to have on a 1920 screen, but on a 320pixels screen the extra resolution is wasted and you have a lot of wasted memory used.

Set background image for all screen size

Convert you image in all below sizes and paste it in particular folder.

xxxhdpi: 1280x1920 px
xxhdpi: 960x1600 px
xhdpi: 640x960 px
hdpi: 480x800 px
mdpi: 320x480 px
ldpi: 240x320 px

Are the best dimensions for the app to run in all devices.

Reference

Creating Android background, how many pixels?

I am not sure what you are looking for exactly, but here are some sizes in pixels:

    320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).  
480dp: a tweener tablet like the Streak (480x800 mdpi).
600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc.).

It is taken straight from Stack Overflow question Android screen size HDPI, LDPI, MDPI.

Full screen background image size for android wear

Here is the image I posted in https://plus.google.com/+WaynePiekarski/posts/YXbZMLhEJ2L

This has the resolution, DPI, and densityDpi values for every Android Wear watch as of July 2015.

Using a 320x320 image for a watch face or activity background will work, but in the future you will need to deal with new screen sizes.

Note that for notification card backgrounds, the image needs to be actually 640x400 (for parallax) and 400x400 for no parallax. See the documentation for more details on this: https://developer.android.com/training/wearables/notifications/creating.html#AddWearableFeatures

Screen details of all Android Wear devices from July 2015



Related Topics



Leave a reply



Submit