January 2018
Intermediate to advanced
434 pages
14h 1m
English
In XML, we use dp or dip as density independent pixels for layouts and views and sp as scale independent pixels for text. dp is a virtual pixel used to define layout sizes in a density-independent way; sp is like dp, but it's also scaled according to the user's font preference. In this recipe, we will understand how we can define dimensions of views and text in dp and sp in DSL layouts.
Read now
Unlock full access