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?
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?
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.
Right from the Android Docs
To set a font for the TextView, In the layout XML file, set the fontFamily attribute to the font file you want to access.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"/>