以下是我正在使用的代码
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line, result);
AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.ContactDisplay);
Pattern p = Pattern.compile("@");
Matcher m = p.matcher(textView.getText().toString());
Log.d(textView.getText().toString(),"Msssssssssssssssssggg");
boolean b = m.matches();
if (b == true)
{
textView.setThreshold(0);
textView.setAdapter(adapter);
}
但是我输入@ symbol
并没有收到任何联系。我应该使用key-events
吗?