androidpixeldpiandroid-screen-support

minimum pixels of the largest image's side to fit android xxhdpi screen


I'm making an android App that shows images at full screen.

I learned some about dpi and dp, but I didn't find how many pixel must be the largest side of my images (in prospective to good fit also in landscape mode) to appear good in different devices.

As in the documentation, the most used screen configurations are normal with hdpi, xhdpi and xxhdpi density: enter image description here

So, if my thinking is correct, I can make only one image to fit the xxhdpi to works fine also with the other two densities, and put it in Android Studio under the "res/drawable" folder (without qualifier). Specifying the image size in dp in the layout, Android should scale the image for the smaller configurations.

But, for the xxhdpi, how many pixel must be the largest side of my image, in pixel, to show good?

Edit: how many pixel must be the longest side of my image to be showed properly in a device with xxhdpi density without the image appearing grainy?

All images are photo, not icons, so I can't use the vector graphics.


Solution

  • By looking at the Android Documentation. One can estimate the size of the picture. look at below picture enter image description here

    So, your image resolution should be in similar resolution

    LDPI:    200 X 320px
    MDPI:    320 X 480px
    HDPI:    480 X 800px
    XHDPI:   720 X 1280px
    XXHDPI:  960 X 1600px
    XXXHDPI: 1440 x 2560px
    

    A little bit of +/- won't affect the outcome because with these standard sizes the aspect ratio of any portrait picture should be respected.