How to prevent TextView font changing, when we change the Device font style in Samsung devices

前端 未结 3 1801
醉酒成梦
醉酒成梦 2020-12-11 04:22

I would like say that I have a strange problem in setting textview font. If I change the Device font style from setting-> display, then textview font style also get chang

3条回答
  •  甜味超标
    2020-12-11 05:05

    This worked for me in kotlin:

    textView.typeface = ResourcesCompat.getFont(this, R.font.opensans_light)
    

提交回复
热议问题