android 代码设置全局字的颜色

先贴代码

val mTheme = resources.newTheme()

val theme = baseContext.theme i

f (theme != null) { mTheme.setTo(theme) }

theme.applyStyle(R.style.JrzDefault, true)

这种情况在于引用公共主题,不方便改动,使用代码来控制,或者切换主题。

    原文作者:苦逼的android啊
    原文地址: https://www.jianshu.com/p/7bf0787ba8a0
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞