Mobile Programming (Android) — Multiple Screen Lifecycle Intent

#ActionPills | Shawal 🇵🇸
5 min readSep 10, 2022

Drawable — Images

Pixels

> the exact number of dots both horizontally and vertically that make up the file.

> this the actual resolution of the file.

DPI (Dots Per Inch)

> the number of dots or pixels per each inch of a printed or scanned document.

Density-independent Pixel (dp)

> A virtual pixel unit that we should use when defining UI layout to express layout dimensions or position in a density-independent way.

> px = dp*(dpi/160)

dp

> Density-independent pixel

> 1 dp = 1 pixel on a 160 dpi screen

sp

> scale-indepent pixel

> similar to dp and is recommended for specifying font sizes

px

> Pixel

> corresponds to actual pixels on the screen

Six generalised densities

> mdpi(medium) ~ 160dpi

> hdpi (high) ~ 240dpi

> xhdpi (extra-high) ~ 320dpi

--

--

#ActionPills | Shawal 🇵🇸

Sharing weekly #ActionPills for both of you and ME. Let's consume and apply this 'actionable pills' in our daily life ^^ > https://taplink.cc/actionpills <