I'm doing a simple program using MultiAutoCompleteTextView
to prompt the common words when I input several letters.
code:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(
this,
android.R.layout.simple_dropdown_item_1line,
ary);
MultiAutoCompleteTextView textView = (MultiAutoCompleteTextView) findViewById(R.id.editText);
textView.setAdapter(adapter);
textView.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
private String[] ary = new String[] {
"abc",
"abcd",
"abcde",
"abcdef",
"abcdefg",
"hij",
"hijk",
"hijkl",
"hijklm",
"hijklmn",
};
Now,when I input 'a' and choose "abcd" but the result become to "abcd,". How to replace the comma with a space?
Thank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…