I’m confused with this. If we have `dp`, device in...
# compose
m
I’m confused with this. If we have
dp
, device independent pixel, and it’s the same no matter the screen size, why do we need notion of
Density
? why just not use
dp
everywhere? is
Density
just for use cases where we need to draw actual pixels and we need to convert
dp
into
px
? if yes, why not also draw using
dp
?
k
When it gets to the layout phase, it does need to be converted into pixels. Same for drawing and things like shaders. And things like icons / bitmaps don’t even make sense in the dp-world.
m
Thank you