Android MultiAutoCompleteTextView 使用空格时不显示列表
我已在我的 Android 应用程序中将适配器设置为 MultiAutoCompleteTextView。
ArrayAdapter<String> adapter = new ArrayAdapter<String>(SearchSuburb.this, android.R.layout.simple_dropdown_item_1line, sub);
searchtext.setAdapter(adapter);
static final String[] sub = new String[] { "Melbourne VIC 3000", "East Melbourne VIC 3002", "West Melbourne VIC 3003", "St Kilda Road Central VIC 3004", "World Trade Centre VIC 3005",
"South Wharf VIC 3006", "Southbank VIC 3006"};
它工作正常,直到我在打字时遇到空格。
当我输入 VIC 时,它会给出预测结果,但当我按空格键时,它会消失。 如何解决这个问题?
提前致谢 !
I have set adapter to the MultiAutoCompleteTextView in my android application.
ArrayAdapter<String> adapter = new ArrayAdapter<String>(SearchSuburb.this, android.R.layout.simple_dropdown_item_1line, sub);
searchtext.setAdapter(adapter);
static final String[] sub = new String[] { "Melbourne VIC 3000", "East Melbourne VIC 3002", "West Melbourne VIC 3003", "St Kilda Road Central VIC 3004", "World Trade Centre VIC 3005",
"South Wharf VIC 3006", "Southbank VIC 3006"};
Its working fine until I come across a space while typing.
When I typed VIC it gives predictive results but when I press space it vanish.
How to fix this problem ?
Thanks in advance !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,发现这个
I had the same problem and found this