Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - large TextView dyanamically

I am intrested to manipulate TextView's and set them to large (setTextAppearance()) ones dynamically. (I wonder why Google always puts a snippet code for the XML not along side with the Java code).

Is anyone familiar how to do it?

UPDATE

TextView txtVw = new TextView(this);
tblRow.addView(txtVw);
txtVw.setTextAppearance(this, android.R.attr.textAppearanceLarge);

The TextView appears on screen, though it does not appear large.

like image 972
Mr. Avatar asked Jul 11 '26 13:07

Mr.


1 Answers

Have you tried something like:

textView.setTextAppearance(context, android.R.style.TextAppearance_Large);
like image 124
Cristian Avatar answered Jul 14 '26 14:07

Cristian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!