5. Assets #

Created Sunday 03 January 2021

Why does the asset folder have multiple folder of similar files? #

Each folder inside stores the same assets but of varying quality, like resolution, bitrate etc. This is done to make the app look the same on different devices.


Why not compute relevant assets from a single best one? #

Density Buckets #

mdpi - medium density device hdpi - high density device xhdpi - extra high density device

How Android handles different resolutions? #

If we use dp the actual size of the photo is the same across all devices. This is the case because Android known the screen’s pixel density and calculates relevant dimensions based on that. It used this calculated information to select relevant assets. Note

Why different resolutions exist? #

Different resolution exist due to developments in display technology and a better lifetime of devices, making backwards compatibility a necessity.

How are assets kept? #