Mobile app version of vmapp.org
Login or Join
Ogunnowo857

: Minimum set of assets to cover all screen sizes, densities, and orientations on Android I'm working on an Android project, and we have a splash screen where the user logs in that has a background

@Ogunnowo857

Posted in: #Android

I'm working on an Android project, and we have a splash screen where the user logs in that has a background image that takes up the entire screen. What is the minimum set of assets needed for this? The documentation suggests to provide different bitmap drawables for different screen densities, and to use size and density-specific resources. We also allow portrait and landscape orientation, so my designer gave me 18 bitmaps to cover large, normal, and xlarge screens each with portrait and landscape bitmaps in each (mdpi, hdpi, and xhdpi) density. This seems a bit excessive to me. Any suggestions?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Ogunnowo857

3 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer715

From your documentation:


You only need to provide density-specific drawables for bitmap files
(.png, .jpg, or .gif) and Nine-Path files (.9.png). If you use XML
files to define shapes, colors, or other drawable resources, you
should put one copy in the default drawable directory (drawable/).


This implies that other types of non-bitmap "drawables" (XML, Vector) are supported. So for the case of a splash screen, perhaps one might design it simply with large color block(s), some text and a single vector image (logo). This way, the color is a "flood fill" or gradient (two or three gradients from color to transparent at differnt angles overlaid can be quite nice) which is handled dynamically by software, the text is handled by the type services of the device (and localizable), and the drawable's resolution (and/or scale) is set at the time of display. You will wind up with a single set of assets and the best-case scenario regarding resolution. This also has the benefit of far less storage and drawables may be reusable in other contexts.

This is device- and program-capability specific.

Alternatively, one might design for the largest size being mindful of small-screen crop (like pan'n'scan for movies), set the drawable to "center without zoom".

10% popularity Vote Up Vote Down


 

@Angie364

The thing is, if all you're going to do to your bitmap to make different versions for different resolutions is to rescale it using an ordinary resampling algorithm, then you may as well only provide it at a single resolution anyway.

The point of including different versions of the bitmap for different resolutions is for when you want to have different artwork shown when at different resolutions.

Here's a demo of plain scaling vs actually modifying your artwork by hand for different resolutions. It's not from Android but the same idea applies.



And here's an article that explains it very well.

Android itself will do plain scaling for you; you only need to provide different artwork when you actually have different artwork targetting different resolutions.

So if all your images are just resized versions of the same thing, you only need to include one (1): the highest resolution of that thing. If you have different artwork tailored specifically to lower resolutions, then include them.

As for actually designing this artwork, whether or not it scales well to lower resolutions or you need to provide alternative artwork for those resolutions really depends on the subject matter. If it's fine details and sharp fine lines then you probably want to provide alternative graphics.

A splash screen probably isn't like that though.

With icons and the like which may not rescale well, 4 different versions for ldpi, mdpi, hdpi and xhdpi is the most you are likely to need, and you may get away with less.

10% popularity Vote Up Vote Down


 

@Phylliss782

It all depends on how well you want to support each device.

If your background is a photo, you can get away with a surprising amount of scaling (and compression) before it starts to look bad.

If it's something that needs to be more precisely rendered (like line art) you may need to go with a couple different densities.

In either case you should have a small set of assets that can be pulled as appropriate and scaled or cropped to fit the viewport. I would think 2 or 3 would do.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme