6
Bearing in mind that when we use the unit sp
in the TextView
there’s always a Warning in this way:
Should use "sp" Instead of "dp" for text Sizes
In this Sopt response shows exactly the difference between the units of measure: Doubt about px, dp, Dip and sp on Android?
sp
Scale-Independent Pixels - Idem to dp, but also consider the size the source the user is using. It is recommended to use this unit when specifying the size of a font, so that it is automatically adjusted to user screen preferences.
dip ou dp
Density-Independent Pixels - This unit shall relate to the resolution of screen. For example if the screen resolution is 160 dpi, it means that a dp represents 1 pixel in a total of 160. USE: I advise instead px always use dp.
The issue of recommendation is in relation to the size that the user defines his source in ACCESSIBILITY in the device settings? Why the recommendation? Why is it recommended to use "sp" instead of "dp" in text sizes?
I don’t understand what your question is.
– ramaral
@ramaral The question is: Why it is recommended to use "sp" instead of "dp" in text sizes?
– viana