Given that when we use the drive sp
in TextView
a warning always appears like this:
Should use "sp" instead of "dp" for text sizes
This SOpt response shows exactly the difference between units of measure: Doubt over px, dp, dip and sp on Android ?
sp
Scale-independent Pixels - Same as dp, but also consider the size source that the user is using. It is recommended that you use this unit when specifying the size of a font, so that it is automatically adjusted according to the user's screen preferences.
dip ou dp
Density-independent Pixels - This unit is relative to the resolution of the screen. For example if the screen resolution is 160 dpi, it means that one dp represents 1 pixel in a total of 160. USE: I advise instead to use px always use dp.
The question of the recommendation is in relation to the size that the user defines his font in ACCESSIBILITY in the device settings? Why the recommendation? Why is it recommended to use "sp" instead of "dp" in text sizes?