android:fontFamily - Change the FontFamily in a TextView

How to Change the FontFamily in a TextView

android:fontFamily added in API Level 16

1. Add a TextView to your activity. 

2. Ensure your minSdkVersion is 16, or greater.

3. In the main.xml file, add the below line

<TextView
    ....
    android:fontFamily = "sans-serif"
/>

4. To make other fonts

android:fontFamily="sans-serif" // roboto regular
android:fontFamily="sans-serif-light" // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2)

5. Compile and run!