Create res / drawable / custom_edittext_style.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/apptheme_textfield_default_holo_light" /> <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/apptheme_textfield_disabled_holo_light" /> <item android:state_enabled="true" android:state_focused="true" android:drawable="@drawable/apptheme_textfield_activated_holo_light" /> <item android:state_enabled="true" android:state_activated="true" android:drawable="@drawable/apptheme_textfield_focused_holo_light" /> <item android:state_enabled="true" android:drawable="@drawable/apptheme_textfield_default_holo_light" /> <item android:state_focused="true" android:drawable="@drawable/apptheme_textfield_disabled_focused_holo_light" /> <item android:drawable="@drawable/apptheme_textfield_disabled_holo_light" />
And add all the required drawable files to the dropdown folder.
<EditText android:id="@+id/edt_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:background="@drawable/custom_edittext_style" android:digits="1234567890" android:ellipsize="end" android:focusableInTouchMode="true" android:inputType="numberPassword" android:singleLine="true" android:textColor="@color/dark" />
source share