我需要啓用自動建議的edittext。 對於這個我使用下面的XML:Android - 在EditText的鍵盤上獲得自動建議?
<EditText
android:id="@+id/edt_description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="@string/description_album_hint"
android:imeOptions="actionNext"
android:inputType="textCapSentences|textAutoCorrect|textAutoComplete"
android:maxLines="2"
android:minLines="2"
android:singleLine="false"
android:textColor="@color/black"
android:textColorHint="@color/hint_color_light_gray" />
即使我加上「textCapSentences | textAutoCorrect | textAutoComplete」爲的inputType仍然沒有建議。
添加截圖(這是我需要實現):
請幫助我。 在此先感謝。
默認建議不用擔心建議。 – 2014-09-04 04:54:49
你想在你的編輯文本中自動完成文本? – 2014-09-04 05:02:55
我認爲你需要使用'AutocompleteTextView'。 http://developer.android.com/reference/android/widget/AutoCompleteTextView.html – Aniruddha 2014-09-04 05:07:19