AutoCompleteTextView
自动完成表单
一个N简单的例子:
AutoCompleteTextView actv = (AutoCompleteTextView)findViewById(R.id.actv1); actv.setAdapter(new ArrayAdapter<String>( this, android.R.layout.simple_dropdown_item_1line,new String[]{"abc","bcd","abcd","abd"}));
本文介绍了一个简单的 AutoCompleteTextView 使用示例。通过设置适配器,可以让 AutoCompleteTextView 实现自动补全的功能。此示例使用 ArrayAdapter 将字符串数组转换为下拉列表。
AutoCompleteTextView
自动完成表单
一个N简单的例子:
AutoCompleteTextView actv = (AutoCompleteTextView)findViewById(R.id.actv1); actv.setAdapter(new ArrayAdapter<String>( this, android.R.layout.simple_dropdown_item_1line,new String[]{"abc","bcd","abcd","abd"}));
746

被折叠的 条评论
为什么被折叠?