Design + Code an Android App from Scratch
This video explains the units of measurements in Android. It takes a simple Image to illustrate that pixels cannot be used to specify sizes in Android has different Android devices can fit different number of pixels on screen. The idea also called screen density determines how crisp an Android screen can be. A screen with higher density takes lesser space to display the same content whereas its the opposite for screens with lower density values. Pixels, Millimetres, Inches, Points, Density Independent Pixels, Scaled Pixels are some of the units of measurement in Android. Every device having its own density, you often target a range of devices with a particular density instead of specific values. These range values are called density buckets. Finally the video illustrates the difference between sp and dp and shows why sp is to be used for font sizes.