[英]Use custom type face in PreferenceScreen
How to change type face of PreferenceScreen
to use a custom font? 如何更改
PreferenceScreen
字体以使用自定义字体? Because PreferenceScreen
is a final class, there is no way to extend it and set its type face in onBindView(View)
. 由于
PreferenceScreen
是最终类,因此无法扩展它并在onBindView(View)
设置其类型face。
You can attempt to iterate over all widgets in your PreferenceActivity
, find those inheriting from TextView
, and adjust their font. 您可以尝试遍历
PreferenceActivity
所有小部件,找到从TextView
继承的小部件,并调整其字体。 Bear in mind, though, that this will only affect the PreferenceActivity
, not any dialogs those Preference
objects display. 但是请记住,这只会影响
PreferenceActivity
,而不影响那些Preference
对象显示的对话框。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.