Roshan A Roshan A - 1 year ago 98
Android Question

EditText space between image and text

I have defined the

EditText
like below

<EditText
android:layout_width="match_parent"
android:layout_height="40dp"
android:id="@+id/searchText"
android:paddingStart="16dp"
android:backgroundTint="@color/grey"
android:drawableStart="@drawable/searchsmall"
android:drawablePadding="15dp"
android:padding="10dp"
/>


The output.

enter image description here

I have set the
android:drawablePadding
but text is not moving to the right.

I want he results like below.

enter image description here

How can I do it ?

Thanks

Answer Source

you can use below code

 android:drawablePadding="5dp"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download