CheckBox and setOnItemClickListener not working in android

前端 未结 4 1019
时光说笑
时光说笑 2021-01-28 02:45

I am using ListView with CheckBox. I have selected only one CheckBox but it\'s automatically selected into Multiple Rows using Scrol

4条回答
  •  独厮守ぢ
    2021-01-28 03:26

    To make your listview focusable, remove focus from the items themselves. Add the following after instantiating listview:

    listview.setItemsCanFocus(false);
    

    Then add the following to your list_item.xml

    
    

    With this, your setOnItemClickListener() will get called

提交回复
热议问题