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

Muhammad Irfan picture Muhammad Irfan · Mar 1, 2013 · Viewed 10.4k times · Source

Well, I am developing app for 7 inch tablet, more specially for nexus 7, and in the XML layout file, i get warning

Avoid using sizes smaller than 12sp: 11sp

if i set the size of any textField to less than 12sp ?

I am adding screen shots for more clarity of the problem

enter image description here

enter image description here

Answer

CommonsWare picture CommonsWare · Mar 1, 2013

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.