究其根本的问题是子view抢了点击事件 属于事件分发范畴。不讲原理了,只贴出解决的代码
解决办法:
1. 子View根布局 设置
android:descendantFocusability="blocksDescendants"
2.子View中 有Button 或者ImageButton之类的设置
android:focusable="false"
3.ListView布局 设置
android:splitMotionEvents="false"
究其根本的问题是子view抢了点击事件 属于事件分发范畴。不讲原理了,只贴出解决的代码
解决办法:
1. 子View根布局 设置
android:descendantFocusability="blocksDescendants"
2.子View中 有Button 或者ImageButton之类的设置
android:focusable="false"
3.ListView布局 设置
android:splitMotionEvents="false"