2

I need to access the following -

android:textStyle(of a digital clock control) 

programmatically, how do I do this?

Cœur
  • 34,719
  • 24
  • 185
  • 251
Chen Kinnrot
  • 19,991
  • 17
  • 77
  • 135
  • refer this previous post http://stackoverflow.com/questions/4630440/how-to-change-a-textviews-style-at-runtime – Aerrow Jul 23 '12 at 09:13
  • You need get whats the text font currently set for widget like textview or edit text? – Vins Jul 23 '12 at 09:17

2 Answers2

6

Use setTypeface(typeface, style)

vasart
  • 6,622
  • 35
  • 37
1

For a textview :

TextView tv = (TextView) findViewById(R.id.tv);

To set the typeface tv.setTypeface(tf);

To get the current typeface set use tv.getTypeface();

Vins
  • 4,019
  • 2
  • 33
  • 50