android listview中經常會遇到 OnItemClickListener 點擊和裏面某個button或者ImageView要求點擊事件,這時候就會起衝突。
解決方案:
1,在listview 的item.xml中根佈局RelativeLayout加上 android:descendantFocusability="blocksDescendants"
2,button裏面加上
android:focusable="false"
android:clickable="true"
android:descendantFocusability用法簡析
詳見另外一個博客
http://www.cnblogs.com/eyu8874521/archive/2012/10/17/2727882.html