Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically use setTextSize to ?attr/textAppearanceLarge

I'm tinkering with a custom preference right now, and I want to give it a label using TextView. However I can't seem to find a way to specify the text size to "large" using setTextView()

What am I missing here?

like image 228
Calyth Avatar asked Apr 16 '12 16:04

Calyth


1 Answers

TextView title = new TextView(context);
title.setTextAppearance(context, android.R.attr.textAppearanceLarge);

or try

setTextAppearance(context, android.R.style.TextAppearance_Large);

use the above code and try

like image 148
Shankar Agarwal Avatar answered Oct 23 '22 19:10

Shankar Agarwal