Set Font Size On Phone And Tablet
How to set the font size for a textview in a phone and a tablet. The posts I've referred suggested to creating dimen.xml and placing them in different folders namely values-mdpi,va
Solution 1:
For tablets I use:
values-sw600dpfor 7″values-sw720dpfor 10″
This slution can be used not just for localizing dimensions but also other values (for instance, styles).
Solution 2:
It looks you got misunderstood from references. You should takes values, values-large folders for variation in fonts of Phone and Tablet. And for better results keep using sp units rather than dp for Font Size
Solution 3:
You could just use sp units instead. It is a lot simpler.
Solution 4:
I tryed this will work text size set default size
create :android/res/values/styles.xml
<stylename="Widget.TextView"><itemname="android:textAppearance">?android:attr/textAppearanceSmall</item></style><stylename="TextAppearance.Small"><itemname="android:textSize">14sp</item><itemname="android:textStyle">normal</item><itemname="android:textColor">?textColorSecondary</item></style>where
<item name="textColorSecondary">@android:color/secondary_text_dark</item>these colors are defined in /res/color/, check /res/color/secondary_text_dark.xml
Post a Comment for "Set Font Size On Phone And Tablet"