Reputation: 683
Is it best practice to vary your text size based on screen size or based on screen density, or both?
I already know to use sp. I have static title text that fits on one line in some screens, and wraps around to the next line on others. I need to avoid the word wrap.
Upvotes: 1
Views: 186
Reputation: 3561
Its good practice to do so. On an 10" Tablet you are better using bigger Text sizes. You can for example define your Custom values for each type of device using the values-sw720dp folder an place it there:
<dimen name="HeadlineSize">28sp</dimen>
Also the already System Values like android:style/TextAppearance.Large scale. Means on an Phone will this be smaller(eg. 18sp) than on an Tablet (24dp)
Upvotes: 1