如何将监听器添加到autocompletetextview,android?

我正在尝试添加在autocompletetextview上选择项目时会做出反应的侦听器…任何人都可以帮助// phonename是autocompletetextview

PhoneName.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView arg0, View arg1, int arg2, long arg3) { Toast.makeText(check.this," selected", Toast.LENGTH_LONG).show(); } public void onNothingSelected(AdapterView arg0) { // TODO Auto-generated method stub } }); 

尝试这个:

 phoneName.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View arg1, int pos, long id) { Toast.makeText(check.this," selected", Toast.LENGTH_LONG).show(); } });