How to Use android:textAppearance in TextView
added in API Level 1Set the base text color, typeface, size and style.
1. Create an Android project, if you don't already have one.
3. Add a file called style.xml to res/values and add the below code.
This will make the text size 40sp.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="myStyle" >
<item name="android:textSize">40sp</item>
<item name = "android:textColor">#FFFFFF</item>
<item name ="android:textStyle">bold</item>
<item name="android:typeface">sans</item>
</style>
</resources>
4. In the main.xml file, add the code below.
...
android:textAppearance = "@style/myTextAppearanceStyle"
/>
5. Compile and run!
Resources:
http://developer.android.com/reference/android/R.attr.html#textAppearance
http://stackoverflow.com/questions/13416315/changing-the-text-appearance-in-styles-and-themes-for-an-android-app