Why android gives warning on using size smaller than 12sp? Why android gives warning on using size smaller than 12sp? android android

Why android gives warning on using size smaller than 12sp?


For the default font scaling, 1sp = 1dip = 1/160". A height of 11sp is about 1/15th of an inch, which is pretty tiny.

This is a Lint error. You can override it -- press <Ctrl>-<1>, and the quick-fix list menu should give you the ability to suppress the message.

But, if you try 12sp, you will probably see that it too is very tiny, and that you want a larger font anyway.


You can use tools:ignore="SmallSp" to ignore that warning

<TextView    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:singleLine="false"    android:text="NileshRathod"    android:textSize="8sp"    tools:ignore="SmallSp"/>