问题描述:
自定义的ListView无法触发OnItemClickListener。
解决方法:
对Item Layout的根控件设置其android:descendantFocusability="blocksDescendants"即可。
本文解决了一个常见的Android开发问题,即自定义的ListView无法触发OnItemClickListener。通过将ItemLayout的根控件设置为android:descendantFocusability=blocksDescendants,可以解决该问题。
问题描述:
自定义的ListView无法触发OnItemClickListener。
解决方法:
对Item Layout的根控件设置其android:descendantFocusability="blocksDescendants"即可。
470

被折叠的 条评论
为什么被折叠?