0

I'm trying to change the color of the bottom line from the focused EditText in my style.

When I start editing text the color of the bottom line changes to a teal in the appcompat.Light them. I'm wondering what attribute this color comes from.

Also I'm supporting back to API 14 so I can't use the tint colors.

l-l
  • 3,804
  • 6
  • 36
  • 42
DanR
  • 141
  • 2
  • 9

1 Answers1

0

You can change this color in xml with this line:

android:backgroundTint="@color/blue"

You can change it in code with something like:

editText.getBackground().setColorFilter(getResources().getColor(R.color.blue), PorterDuff.Mode.SRC_ATOP);

You can also change this everywhere in your app by adding this line to you style in your themes.xml file:

<item name="colorControlActivated">@color/blue</item>
l-l
  • 3,804
  • 6
  • 36
  • 42