0

I'm trying to set the purple underline and cursor colors in an EditText to match green buttons in a dialog (see pic attached). I need to set the colors within the code, as different screens have different color schemes, all set within the code. The colorControlActivated was not introduced until Lollipop and is not available in KitKat, which we have to support.

I look through the question on Stack Overflow Set EditText cursor color, Tried using AppCompatEditText and learned about colorControlActivated property in this article: TextInputLayout proper Theming. I've not found anything that allows me to change the colors in and EditText on KitKat.

enter image description here

Thanks for you help.

kralvarado
  • 458
  • 5
  • 13

1 Answers1

0

Try this solution :

Instead of using EditTextView, change it to "android.support.v7.widget.AppCompatEditText" and then do something like this :

<android.support.v7.widget.AppCompatEditText

  app:backgroundTint="@color/red" />

Make sure you are setting app:backgroundTint instead of android:backgroundTint

Azhar92
  • 923
  • 2
  • 8
  • 17