开发者

Custom typeface for dialog's title

开发者 https://www.devze.com 2023-02-02 23:26 出处:网络
In an application I\'m building, I\'m trying to systematically change the font of every piece of text to a custom font.Does anyone know whether it\'s possible to apply styles such as custom typefaces

In an application I'm building, I'm trying to systematically change the font of every piece of text to a custom font. Does anyone know whether it's possible to apply styles such as custom typefaces to the title of a dialog?

So far, I haven't been able to find a way, and so my best bet seems to be to use an AlertDialog, an开发者_C百科d just use a textview as my title in a layout that I inflate. This is a bit long winded, so if there's a direct way to customize the style of the dialog's title, that would save some time!


Try using/inheriting DialogWindowTitle and/or @style/TextAppearance.DialogWindowTitle.

See https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/styles.xml

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号