L
L
lovlovbat2015-01-15 20:36:31
Android
lovlovbat, 2015-01-15 20:36:31

How to understand the ratio of dp/dip to sp?

In all converters dip/dp to sp translates one to one. The android 5 guide has marked up layouts, with a tile thickness of 48 dp, indentation from the text (inside this tile) 16 dp on top and 20 dp on the bottom, and the text size itself is 16sp , the tile should be equal to 52 dp. It turns out that 16sp should be equal to 12dp, which is not true. Help me figure it out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artix, 2015-01-16
@nikkorejz

The number of dp / dip directly depends on the screen size. Sp is the size name for the text, i.e. this size may vary depending on the phone settings, and dp will change solely on the screen size of the smartphone. Those. if you set for example "increased text size", then the size will no longer be 16sp but 20sp.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question