
如何更改AndroID应用程序的整个字体?
之前我在github上看过 @L_301_1@.该解决方案仅适用于低于API 21的设备.
对于androID 5,即使我们分别使用styles.xml添加values-v21文件夹,此方法也不起作用.
这是我的值-v21 / styles.xml:
<resources> <style name="AppBasetheme" parent="theme.AppCompat.light.DarkActionbar"> </style> <style name="Apptheme" parent="AppBasetheme"> <item name="androID:typeface">serif</item> </style></resources>解决方法
<style name="Apptheme" parent="AppBasetheme"> <item name="androID:textVIEwStyle">@style/RobotoTextVIEwStyle</item> <item name="androID:buttonStyle">@style/RobotobuttonStyle</item></style><style name="RobotoTextVIEwStyle" parent="androID:Widget.TextVIEw"> <item name="androID:FontFamily">sans-serif-light</item></style><style name="RobotobuttonStyle" parent="androID:Widget.Holo.button"> <item name="androID:FontFamily">sans-serif-light</item></style>
然后将主题应用到您的应用
<application androID:theme="@style/Apptheme" ></application>@H_502_32@ 总结
以上是内存溢出为你收集整理的更改Android应用程序的所有字体全部内容,希望文章能够帮你解决更改Android应用程序的所有字体所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)