Set Image on Left side of EditText in Android

后端 未结 4 1464
没有蜡笔的小新
没有蜡笔的小新 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:47

    Instead of using android:drawableLeft="@drawable/name_icon_edittext", create separateImageView for the name_icon. This way you have more control on placing it on the layout

    Note: I am assuming your layout is RelativeLayout

提交回复
热议问题