androidtextviewandroid-xmlandroid-fonts

How to set Roboto variant font family to a Textview in android?


I have to add Roboto bold font style to my textview. How to implement that in android studio.

whether I have to add font family from externally or is there an option to add that internally?

I don't know what to do? Can you help me to solve this?


Solution

  • For any font family,We have to download that file(.ttf format) and add that file into our project directory.That too under the font directory.After adding those files,we can use that in our textview using android:fontFamily attribute.