我想在自动完成文本视图中单击的项目的同一行中显示一些特定值。
final AutoCompleteTextView autoCompleteTextView= (AutoCompleteTextView)findViewById(R.id.autocompleteView);
autoCompleteTextView.setAdapter(autoComplete);
autoCompleteTextView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3)
{
String item = (String) arg0.getItemAtPosition(arg2);
Toast.makeText(MapActivity.this, item, Toast.LENGTH_LONG).show();
}
});