Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : set TextView style at runtime

Tags:

android

Does any body know how to set style for TextView at run time:

something like this

myTextView.setStyle(R.style.mystyle);
like image 472
Mohammad Rukab Avatar asked Jul 13 '10 13:07

Mohammad Rukab


1 Answers

Very easy just use setTextApparence and your style

 myTextView.setTextAppearance(getApplicationContext(), R.style.boldText);
like image 122
Yayo28 Avatar answered Sep 22 '22 23:09

Yayo28