2

I need to access the following -

android:textStyle(of a digital clock control) 

programmatically, how do I do this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Chen Kinnrot
  • 20,609
  • 17
  • 79
  • 141
  • 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,692
  • 38
  • 39
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,089
  • 2
  • 35
  • 50