Adham Adham - 5 months ago 80
Android Question

How to add icon inside EditText view in Android ?

I want to add a "search" icon to appear inside an

EditText
in the left edge? such as search box in Facebook Android app?

Answer

Use the android:drawableLeft property on the EditText.

<EditText
    ...     
    android:drawableLeft="@drawable/my_icon" />