I am trying to add tint to my normal Textview not AppCompatTextView. I can add backgroundTint in xml using app:backgroundTint for it. Is there a way to do the same programatically for Textview itself.(I am targeting kitkat support)
Note: I have more Textview. so changing all of them will be over work
setSupportButtonTintListonly works forAppCompatcontrols.setBackgroundTintListshows no result in kitkat
This works for me
someTextView.getBackground().setTint(yourIntColor);
Note
Added in version 23.1.1 So you can't use in 19
For AppCompat , You can use setSupportButtonTintList
void setSupportButtonTintList (ColorStateList tint)
tvOBJ.setSupportButtonTintList(ContextCompat.getColorStateList(CurrentActivity.this, R.color.your_color));
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