I'm trying to make underline line color change for EditText (validation, so it must be able to change in runtime). I'm using AppCompat to do it. The problem is that on API >= 21, I see transparent black line (gray overlay), instead of bolded version.
How to make it the same as in API 16?
I used this code to change tint:
final Drawable originalDrawable = view.getBackground();
final Drawable wrappedDrawable = DrawableCompat.wrap(originalDrawable);
DrawableCompat.setTint(wrappedDrawable, Color.RED);
setBackground(view,wrappedDrawable);
Aucun commentaire:
Enregistrer un commentaire