I'm trying to add an Left Icon to my TextInputLayout, but text get over the Icon. When I add a padding, everything move together.
I tried with
android:drawableLeft="@drawable/ic_store_white_48dp"
android:drawablePadding="50dp"
android:drawableStart="@drawable/ic_store_white_48dp"
But it is not working ! I should implement a LinearLayout horizontal for each row, but I would like to be sure there is no easier way to do it
Here is my code layout:
<android.support.design.widget.TextInputLayout
android:id="@+id/til_calle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/et_calle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_store_white_48dp"
android:drawablePadding="50dp"
android:drawableStart="@drawable/ic_store_white_48dp"
android:hint="Calle"
android:inputType="text" />
</android.support.design.widget.TextInputLayout>
Make sure you are using the latest
Design
library, all you need for bothDesign
andAppCompat
is:compile 'com.android.support:design:23.2.0'
Try using both the Design's library
TextInputLayout
and AppCompat'sAppCompatEditText
.