0

I am following 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.

mobibob
  • 8,670
  • 20
  • 82
  • 131

2 Answers2

0

It seems that it is not possible from xml/styles... You can only specify it from java code. check here if you are interesting.

Community
  • 1
  • 1
Sephy
  • 50,022
  • 30
  • 123
  • 131
  • That was my conclusion after some dialog with my colleagues -- but I was hoping for a clean solution without modifying the kernel :) – mobibob Jul 27 '10 at 15:14
0

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!

Richard Lalancette
  • 2,401
  • 24
  • 29