Set Image on Left side of EditText in Android

后端 未结 4 1454
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 10:11

I am having one contact form in which I would like to add some icons to my edit text for a better look. I want to create EditText something like below.

4条回答
  •  暖寄归人
    2020-12-09 10:22

    if you want to add some space between you text and image then use'drawablePadding' property in xml

    android:drawablePadding="10dp"
    

    here is complete example how to use in edittext in xml file

                 
    

提交回复
热议问题