Reputation: 11
I've made a basic browser, and I want to use autocomplete edittext in my ActionBar(ToolBar).
I have read this--> https://developer.android.com/training/keyboard-input/style It says that I need an adapter that provides the keywords list for auto-completion, but I need it for prediction purposes. Using a text resource for prediction will make it static(limited).
I need it as our mobile browsers have, just type a keyword and it suggests you. It suggests you a word or a complete sentence.
like this screenshot:
please help me... Thank You :-)
Upvotes: 1
Views: 508
Reputation: 15
use this:
<?xml version="1.0" encoding="utf-8"?>
<AutoCompleteTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/autocomplete_country"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
Upvotes: 1
Reputation: 88
use 'AutoCompleteTextView' instead of normal EditText.
https://developer.android.com/training/keyboard-input/style
Upvotes: 1