Onclicklistner not working in fragment listview

前端 未结 10 1312
不知归路
不知归路 2020-12-11 06:49

I have a listview with custom adapter in listfragment and also set onclicklistner for listview. But Onclicklistner does not work.

Here is my code:

p         


        
10条回答
  •  悲哀的现实
    2020-12-11 07:19

    Adapter has method areAllItemsEnabled (), it might be useful.

    public abstract boolean areAllItemsEnabled ()

    Indicates whether all the items in this adapter are enabled. If the value returned by this method changes over time, there is no guarantee it will take effect. If true, it means all items are selectable and clickable (there is no separator.)

提交回复
热议问题