Combine Spinner and AutoCompleteTextView
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am asking myself if it is possible, to combine a Spinner and a AutoCompleteTextView . Basically I want an AutoCompleteTextView , that shows all entries from Array when I click it. Does anybody know how to do that? 回答1: Try this code: ArrayAdapter myAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, YOUR_ARRAY); myAutoCompleteTextView.setAdapter(myAdapter ); 回答2: Just found out that this does exactly what I was asking for: final AutoCompleteTextView textView; final ArrayAdapter<String> arrayAdapter = new