December 2013
Beginner
416 pages
12h 45m
English
If you use the right units and take a little care with your layouts, Android helps your app scale to different screen sizes and different screen densities.
For spacing and layout, it’s best to use dp units. This means that views and margins on the screen will be roughly the same size on devices having different screen densities. They will not be exactly the same size as measured with a ruler, because Android groups screen density and doesn’t use the actual physical screen density. You’ll explore this in more detail later.
For fonts, you should use sp units (scale-independent pixels). sp units act the same as dp units in that sp units are independent of the device’s screen dpi, and they also take ...
Read now
Unlock full access