Illya Bublyk
Illya Bublyk

Reputation: 722

android:inputType="textAutoComplete" doesn't work

TextAutoComplete doesn't work in TextInputLayout from last version of appcompat.design library in Android.

<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/comment_title">

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:textColor="@color/black"
        android:hint="Заголовок"
        android:maxLength="10"
        android:inputType="text|textAutoCorrect|textCapSentences|textAutoComplete"
        >
    </EditText>

</android.support.design.widget.TextInputLayout>

Upvotes: 2

Views: 1668

Answers (2)

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75788

Android AutoCompleteTextView is a editable text field, it displays a list of suggestions in a drop down menu from which user can select only one suggestion or value. so use AutoCompleteTextView instead EditText .I hope it helps you . For demo purpose please check android-autocompletetextview-example

Upvotes: 3

Aleksander Monk
Aleksander Monk

Reputation: 2907

Just use an AutoCompleteTextView instead of normal EditText.

Here you can find an example. http://developer.android.com/guide/topics/ui/controls/text.html

Upvotes: 0

Related Questions