Android : EditText background base line color changing based on its focus in android

on Thursday, September 4, 2014


I need to design EditText with base line showed in below image and it will be change to some other color when it receives focus.!


enter image description here


i am using the following.



<EditText
android:id="@+id/mobilenumber"
android:drawableLeft="@drawable/mobile"
android:drawablePadding="15dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:background="@drawable/edt_bg"
android:singleLine="true"
android:textColorHint="#FFFFFF"
android:hint="@string/mobilenumber"
android:layout_marginTop="20dp"
android:layout_gravity="center"
android:padding="5dp"
android:imeOptions="actionNext"
android:maxLength="10"
android:textColor="#ffffff"
android:textCursorDrawable="@null"

/>


So, please guide me how to handle this.


0 comments:

Post a Comment