Autocompletetextviewで項目が選択されたときに反応するリスナーを追加しようとしています...誰か助けて//電話名は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();
}
});