Alex Alex - 1 year ago 233
Android Question

How to change line color in EditText

I am creating an EditText in my layout xml file

But I want to change color line in EditText from Holo to (for example) red.
How that can be done?

enter image description here

Answer Source

This is the best tool that you can use for all views and its FREE many thanks to @Jérôme Van Der Linden.

The Android Holo Colors Generator allows you to easily create Android components such as EdiText or spinner with your own colors for your Android application. It will generate all necessary nine patch assets plus associated XML drawable and styles which you can copy straight into your project.

try it

this image put in background of EditText


enter image description here


For API 21 or higher, you can use android:backgroundTint

        android:hint="Underline color change"
        android:backgroundTint="@android:color/holo_red_light" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download