ListFragment OnListItemClick not being called

后端 未结 11 1456
盖世英雄少女心
盖世英雄少女心 2020-11-27 05:53

I have a class that extends ListFragment, and it overrides the OnListItemClick method. I am also doing this in another ListFragment the same way (and the method gets called)

11条回答
  •  北海茫月
    2020-11-27 06:14

    I found out that setting the property android:focusable to false on any child view of a list item prevents the click handler from being fired. The following setup works with a ListFragment.

    navigation_fragment.xml:

    
    

    navigation_entry.xml:

        
                
    

提交回复
热议问题