how to add listener to autocompletetextview, android?

后端 未结 2 475
时光取名叫无心
时光取名叫无心 2021-01-07 16:49

I am trying to add listener that will react when an item is selected on the autocompletetextview...can anyone help //phonename is the autocompletetextview

Ph         


        
2条回答
  •  伪装坚强ぢ
    2021-01-07 16:54

    try this:

    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();
    
            }
        });
    

提交回复
热议问题