Left Icon in TextInputLayout

With the Material Components library you can change the left icon in the TextInputLayout using the app:startIconDrawable attribute.

Something like:

    <com.google.android.material.textfield.TextInputLayout
        android:hint="Hint text"
        app:startIconDrawable="@drawable/ic_add_24px"
        ...>

        <com.google.android.material.textfield.TextInputEditText/>

    </com.google.android.material.textfield.TextInputLayout>

enter image description here


Make sure you are using the latest Design library, all you need for both Design and AppCompat is:

compile 'com.android.support:design:23.2.0'

Try using both the Design's library TextInputLayout and AppCompat's AppCompatEditText.

<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:textColor="@android:color/white"
    android:textColorHint="@color/loginHint">

    <android.support.v7.widget.AppCompatEditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:imeOptions="actionNext"
        android:inputType="textEmailAddress|textNoSuggestions"
        android:minWidth="350dp"
        android:drawableLeft="@drawable/ic_store_white_48dp"
        android:drawableStart="@drawable/ic_store_white_48dp"
        android:textColor="@android:color/white"
        android:textColorHint="@color/loginHint"
        android:textCursorDrawable="@null"
        app:backgroundTint="@android:color/white"/>
</android.support.design.widget.TextInputLayout>