Reputation: 467
i have edit text like this :
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="input something"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#04ff00"
android:textColorHint="#0094fd"/>
this is result:
like image, I want to change background of text when input in edittext.
how to do it?
Upvotes: 2
Views: 605
Reputation: 2643
To achieve that behaviour add textColorHighlight
to your EditText
:
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="input something"
android:layout_weight="1"
android:textSize="20sp"
android:textColor="#04ff00"
android:textColorHint="#0094fd"
android:textColorHighlight="@android:color/holo_red_light"/>
The final result is something like this:
Upvotes: 1