Calyth Calyth - 1 year ago 119
Android Question

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?

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

or try


use the above code and try

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download