How to change line color in edit text ?

Sudish Kumar
Jan 2, 2021

--

For change the line color in editText you should use backgroundTint=”color name” in .xml file after that run your app it will work proper.

android:backgroundTint="@android:color/holo_red_light"

You can use this code like that which is written bellow.

<EditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:hint="Underline color change"
android:backgroundTint="@android:color/holo_red_light" />

Or

<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"android:hint="Underline color change"
app:backgroundTint="@color/blue_gray_light" />

Both EditText is working proper you ca try this codes

Thank you , I wish you good day and night.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sudish Kumar
Sudish Kumar

Written by Sudish Kumar

Flutter | Android | Node | Dart | Kotlin | Java | JavaScript | TypeScript | PHP | Short Story Teller | Tech Lead

No responses yet

Write a response