Can one specify the fontType in android styles xml?
I am fol开发者_Go百科lowing an example project "Sky" by Jeff Sharkey using styles in my layout. It is working out quite well, however, I cannot determine how to specify the font type-face using the styles. Without this, I will have to apply the font explicitly to every TextView, EditView, etc., whereas I want to control where and when it is applied throughout my application.
It seems that it is not possible from xml/styles... You can only specify it from java code. check here if you are interesting.
You can do this by creating your own textview class and use that in your layouts.
Inside your new custom class, set the font you want.
Et voila!
精彩评论