I use android studio to create an android app. I use as an OS Ubuntu 14.04. In my app, I want to change the font, I follow the following step:
After that, the font doesn't change because we should change it also in the attributes of the graphical layout.But, when I go to the attributes in the graphical layout, I didn't found the fontfamily attribute under textAppearance property. I want to know why the fontfamily attribute does not exist in the list of proprety and how can I add it.
Some common problems you should check:
android:fontFamily only works from API version 16. On Android versions below, the property will have no effect.android:fontFamily with your own fonts was added in Support Library v26 and Android Studio 3.0 (together with Android Gradle Plugin version 3.0). If you are using older versions of any of these, it will not work.android:FontFamily. TextView, EditText, Button, and a few others do, but Checkbox and Switch don't. There you need to use setTypeFace in code instead.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With