How to change the color of the line below EditText via xml

4

How to change the color of this line under EditText via xml?

    
asked by anonymous 30.08.2018 / 11:13

1 answer

3

Try it this way:

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="Something or Other"
    android:backgroundTint="@android:color/holo_green_light" />

Warning, it will only work with API 21 or higher.

If you have a lower version, you can try this:

<android.support.v7.widget.AppCompatEditText app:backgroundTint="@color/blue_gray_light" />
    
30.08.2018 / 11:36