How to move the icon on an EditText on Android?

Viewed 56

I just added an icon to my EditText, but unfortunately I can't move it further to the right, what can I do?

activity_main.xml

<EditText
android:id="@+id/inserisciNumero"
android:hint="Numero di telefono"
android:layout_width="321dp"
android:layout_height="46dp"
android:drawableStart="@drawable/iconatelefono"
android:drawablePadding="12dp"
android:background="@drawable/sottofondoedit"
tools:layout_editor_absoluteX="36dp"
tools:layout_editor_absoluteY="183dp" />

enter image description here

1 Answers

Add start padding as follows:

android:paddingStart="12dp"

This will move everything to the right in your EditText including the drawable.

Related