0

I have a 32dp * 32dp TextView and a single "A" character in center with size of 10pt. In my device "A" is exactly fit to bounds (from top and bottom and looks good) but in other devices it is smaller or overflows the bounds.

Does dp, ds, px or other units help? (please remind I am not searching for this automatic resizeable font where I have exact height of 32dp)

Community
  • 1
  • 1
Ali Sheikhpour
  • 10,475
  • 5
  • 41
  • 82

1 Answers1

0

Use sp as the unit of measurement to set text size to support different densities across devices. Also, read this for a good explanation of dp/sp.

earthw0rmjim
  • 19,027
  • 9
  • 49
  • 63