Reputation: 51
How can i use above image inside of edit text Android?
Upvotes: 0
Views: 105
Reputation: 189
Add left paddding and set EditText background to your drawable:
android:paddingLeft="10dp"
android:background="@drawable/my_icon"
Upvotes: 0
Reputation: 2885
user this in your edittext
<EditText
...
android:drawableLeft="@drawable/my_icon" />
Another way is that you can create ImageView for that icon. This way you have more control on placing it
Upvotes: 1
Reputation: 3022
You can use the "drawableLeft" attribute of EditText
. For example:
android:drawableLeft="@drawable/ic_user"
http://developer.android.com/reference/android/widget/TextView.html#attr_android:drawableLeft
Upvotes: 1