How to set custom font in .xml file instead of .java file?

前端 未结 8 477
無奈伤痛
無奈伤痛 2020-12-05 10:14

I am creating one Application in which I want to set custom font.

But I can\'t use custom Fonts in .xml file, for using this I need to initialize each and every Text

8条回答
  •  一生所求
    2020-12-05 10:31

    Android 8.0 (API level 26) and Android Support Library 26 introduce support for APIs to request fonts from a provider application instead of bundling files into the APK or letting the APK download fonts. The feature is available on devices running Android API versions 14 and higher through the Support Library 26.

    Please Follow this link https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts

提交回复
热议问题