I'm creating a textView programmatically. Is there a way that i can set the style of this textView? Something similar to
style="@android:style/TextAppearance.DeviceDefault.Small"
which I would use if I had a layout.xml
file.
Set The Text of The TextView You can set the text to be displayed in the TextView either when declaring it in your layout file, or by using its setText() method. The text is set via the android:text attribute.
You can't programmatically set the style of a View, but you might be able to do something like textView.setTextAppearance(context, android.R.style.TextAppearance_Small);
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With