-1

How will \t be treated while formatting a textview in Android. Would it be different from screen size to screen size? Is there any alternative for it be similar in all screen sizes?

nandu
  • 123
  • 1
  • 9

1 Answers1

1

TextView size would vary from device to device based on the screen size and text size you give in your XML design. You can give textSize in sp

Example: android:textSize="10sp"

Based on the screen size, Android will convert sp size into pixels.

You can refer this SO Answer on how conversion works. You can read more about TextView from official document here.

Hope this helps.

Naveen T P
  • 6,955
  • 2
  • 22
  • 29