Custom EditText into Android

  • A+

I'd like to put attach file icon into EditText for example how it was made into WhatsApp. How can I do it?

Custom EditText into Android


Use drawableRight attribute in EditText

<EditText android:id="@+id/account_et" android:layout_width="match_parent" android:layout_height="fill_parent" android:drawableRight="@drawable/icon_backall" //your drawable which you want to use android:ems="10" android:hint="@string/str_md_email" android:padding="10dp" > </EditText> 


:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: