Android AutoCompleteTextView
AutoCompleteTextView:
AutoCompleteTextView is a kind of EditText where, while the user types, suggestions appear as a drop-down list.
It is commonly employed when typing messages or texts and it hastens completion of the typed text due to its ability to predict typed data.
Example:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AutoCompleteTextViewExample"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="These text check in input your text: One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten"
android:textSize="16sp"
android:layout_marginBottom="20dp"/>
<AutoCompleteTextView
android:id="@+id/auto_com_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:maxLines="1"
/>
</LinearLayout>
Output