Skip to content

Instantly share code, notes, and snippets.

@AB1209
Created November 22, 2018 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AB1209/2e7e3ce170c3040fcc58b37fe25fe440 to your computer and use it in GitHub Desktop.
Save AB1209/2e7e3ce170c3040fcc58b37fe25fe440 to your computer and use it in GitHub Desktop.
Layout clearable_edit_text.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/clearable_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="35dip" />
<Button
android:id="@+id/clearable_button_clear"
android:layout_width="30dip"
android:layout_height="30dip"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dip"
android:background="@drawable/image_clear" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment