AutocompleteTextView is not editable after exceeding threshold value

こ雲淡風輕ζ 提交于 2019-12-24 11:27:56

问题


I guess I miss some little detail using AutocompleteTextView. Usage is quite straight and ordinary, as shown below:

AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView) findViewById(R.id.auto_complete_text_view);
autoCompleteTextView.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_dropdown_item_1line, arrayList));

XML:

   <AutoCompleteTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/auto_complete_text_view"
        android:hint="@string/hint"
        android:completionThreshold="1"
        android:dropDownWidth="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:scrollHorizontally="true"
        android:ellipsize="end"
        android:lines="1"
        android:maxLines="1"
        android:layout_marginLeft="@dimen/external_margin"
        android:layout_marginRight="@dimen/external_margin"
        android:layout_marginBottom="@dimen/external_margin"
        />

App launches, dropdownlist appears, but I can't enter more than 1 symbol (or more than specified in threshold parameter). I can't neither delete more than 1 symbol if I've chosen some option from the list.

I suppose as you already understand, I need fully editable input field with dropdown "hints".

Thanks!

来源:https://stackoverflow.com/questions/32155042/autocompletetextview-is-not-editable-after-exceeding-threshold-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!