开发者

how to add listener to auto complete drop down list in android?

开发者 https://www.devze.com 2023-02-03 08:56 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号