仍然是android的新手
我必须克隆一个iphone应用程序。我在找出如何克隆这个元素的最佳方法时遇到了问题:

这是一个文本框,您可以在其中键入有限数量的字符。当你按下它时,列表应该显示你输入的最后五个元素(不是自动完成),这样当你点击它们时,它们会被输入到文本框中。
您将如何处理此问题?扩展哪个类最好(我知道存储可以通过共享首选项来完成)
谢谢
发布于 2012-02-07 21:41:51
创建一个AutoCompleteTextView,如下例所示
STACKOVERFLO.com/questions/2126717/
在SharedPreferences中存储历史记录
发布于 2013-11-08 20:15:34
执行以下操作:
AutoCompleteTextView textView = (AutoCompleteTextView)findViewById(R.id.autocomplete_country);
// Get the string array
String[] countries = getResources().getStringArray(R.array.countries_array);
// Create the adapter and set it to the AutoCompleteTextView
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, countries);
textView.setAdapter(adapter);https://stackoverflow.com/questions/9131640
复制相似问题