I\'m trying to use the TextView constructor with style like this:
TextView
TextView myText = new TextView(MyActivity.this, null, R.style.my_style);
We can use TextViewCompact.setTextAppearance(textView, R.style.xyz).
TextViewCompact.setTextAppearance(textView, R.style.xyz)
Android doc for reference.