我在我的android应用程序中设置了适配器到MultiAutocompleteText视图。

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 had the same problem and found this

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top