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?
There may be three ways to go about achieving this: 1 Set android:hint on TextInputLayout to a space _ character, and keep android:hint="This is my cool hint" set on the EditText . By setting android:hint=" " , if (TextUtils. isEmpty(mHint)) evaluates to false , and the EditText retains its hint.
android:completionHintView. Defines the hint view displayed in the drop down menu. android:completionThreshold. Defines the number of characters that the user must type before completion suggestions are displayed in a drop down menu.
Just call your adapter. getItem(position) and you will get the output you want. For example skillLevelAdapter. getItem(position).
No .
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With