I want to apply custom fonts on my android app which is using androidx (not support library!!)
But all of the ways for this that i found by searching are for support library.
They say that use android.support.v7.widget.appcompatTextview. But I have to use androidx.
I tried a lot of things
- using both
<item name="android:fontFamily">@font/custom_font_family</item>
<item name="fontFamily">@font/custom_pen_font_family</item>
- For applying all API level. custom_font_family.xml of /font
android:font="@font/nanumbarunpen"
android:fontStyle="normal"
android:fontWeight="400"
app:font="@font/nanumbarunpen"
app:fontStyle="normal"
app:fontWeight="500" />
- set a value to attribute of the widget directly.
<TextView
android:fontFamily="@font/custom_font_family"
.../>
even those attempts, it was all ignored.
But! preview display custom font correctly! (still no changes in my real phone...)
help me....please,,,,....... TT