AutoCompleteTextView float hint

Marcelo Baccelli picture Marcelo Baccelli · Aug 13, 2015 · Viewed 7.5k times · Source

I've tried a lot, but can't make work an AutoCompleteTextView float hint using the TextInputLayout from support.

It's possible or I need to use an external library?

Answer

N J picture N J · Aug 13, 2015

No .

design library itself is enough

include like this

<android.support.design.widget.TextInputLayout
    android:id="@+id/til_id"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="125dp"
    >

    <AutoCompleteTextView
        android:id="@+id/auto_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Id"
        android:singleLine="true"/>
</android.support.design.widget.TextInputLayout>