how to add listener to auto complete drop down list in android?
I have an auto-complete drop down list, I want to make some action when I click on one item in the list.. is there any listener or event 开发者_如何学Gohandler to to this ??
use this, this will provide you method called setOnItemClickListener().
private AdapterView.OnItemClickListener searchItemClicked = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
//your code here
}
}
It's important to note that OnItemSelectedListener does not activate when a user selects a dropdown.
精彩评论