-4

As i type value in edit text in android i need to change the color of the edit text bottom line to black.

I tried using text watcher but not sure how exactly to change the bottom line color ? Only the line portion below the text should change.

I need to change the edit text color of line below with every input entered. Remaining line color should remain the same.

alibaba
  • 13
  • 2
  • 1
    Possible duplicate of [Changing EditText bottom line color with appcompat v7](http://stackoverflow.com/questions/26574328/changing-edittext-bottom-line-color-with-appcompat-v7) – Gueorgui Obregon Mar 22 '16 at 19:03

2 Answers2

0

You need to add a text watcher to your EditText. After you detect the change you can use this answer to change the color.

Community
  • 1
  • 1
Zaid Qureshi
  • 1,203
  • 1
  • 10
  • 15
0

I guess with seeker with edit text this can be done

<SeekBar android:layout_height="wrap_content"
         android:layout_width="wrap_content"
         android:max="255"
         android:layout_gravity="center_vertical"
         android:layout_weight="1"
         android:padding="10dp"
         android:id="@+id/seekX"></SeekBar>
<EditText android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight=".01"
          android:minWidth="50sp"
          android:maxWidth="50sp"
          android:gravity="center_horizontal"
          android:padding="10dp"
          android:layout_marginRight="10dp"
          android:inputType="number"
          android:id="@+id/editX"></EditText>
alibaba
  • 13
  • 2