listview和checkbox点击事件冲突解决
来源:互联网 发布:如何正确对待人工智能 编辑:程序博客网 时间:2024/04/28 06:37
在itemlist里面的父布局加上:android:descendantFocusability="blocksDescendants"(listview和checkbox事件都可以响应)
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/y23" android:layout_marginLeft="@dimen/x23" android:layout_marginRight="@dimen/x23" android:layout_marginTop="@dimen/y23" android:background="@mipmap/list_paijian_yiwancheng_chang" android:descendantFocusability="blocksDescendants" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:id="@+id/cap_position" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x68" android:text="1" /> <android.support.constraint.ConstraintLayout android:id="@+id/cl_click_list_entity" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x114"> <TextView android:id="@+id/cpa_waybill" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/task" android:textColor="#aaffffff" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/cpa_waybill_value" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x23" android:text="0816196731-193855" app:layout_constraintLeft_toRightOf="@+id/cpa_waybill" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/cpa_weight" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/y12" android:text="@string/department" android:textColor="#aaffffff" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/cpa_waybill" /> <TextView android:id="@+id/cpa_weight_value" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x23" android:layout_marginTop="@dimen/y12" android:text="@string/fake_business_depart" app:layout_constraintLeft_toRightOf="@+id/cpa_weight" app:layout_constraintTop_toBottomOf="@+id/cpa_waybill" /> <TextView android:id="@+id/cpa_volume" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/y12" android:text="@string/active" android:textColor="#aaffffff" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/cpa_weight" /> <TextView android:id="@+id/cpa_volume_value" style="@style/text_28_white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/x23" android:layout_marginTop="@dimen/y12" android:text="@string/fake_votes" app:layout_constraintLeft_toRightOf="@+id/cpa_volume" app:layout_constraintTop_toBottomOf="@+id/cpa_weight_value" /> <CheckBox android:id="@+id/is_check" android:layout_width="@dimen/x69" android:layout_height="@dimen/y69" android:layout_marginBottom="8dp" android:layout_marginLeft="8dp" android:layout_marginRight="@dimen/x75" android:layout_marginTop="8dp" android:background="@drawable/select_radio_bg" android:button="@null" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@id/cpa_weight_value" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.529" /> </android.support.constraint.ConstraintLayout></LinearLayout>
阅读全文
0 0
- listview和checkbox点击事件冲突解决
- checkbox 与listview 点击事件冲突
- android listview里包含组件(checkbox)点击事件和Item的点击事件冲突
- android listview里包含组件(checkbox)点击事件和Item的点击事件冲突
- Listview里包含组件(checkbox)点击事件和Item的点击事件冲突
- ListView 与CheckBox 触发事件冲突解决
- 解决Listview的item和里面控件点击事件冲突
- 完美解决listView 文字超链接点击事件和listitem点击事件冲突问题
- Android中解决listview的item点击事件和子控件点击事件的冲突
- ListView点击事件冲突
- 解决android listview中OnItemClickListener事件和里面button点击事件冲突问题
- 解决自定义ListView中滑动事件和点击的setOnItemClickListener事件冲突的问题
- ListView和ListItem中的CheckBox点击冲突的问题
- Android ListView和item中的CheckBox点击冲突的问题解决
- Android学习之解决ListView中item点击事件和item中Button点击事件冲突问题
- expandablelistview、listView嵌套gridview点击事件冲突解决
- 解决ListView的Item包含Button的点击冲突事件
- listview的item的点击事件与checkbox点击时间冲突
- 利用mybatis-generator自动生成代码
- 全民聚焦电信诈骗防治《烧脑24小时》还原真实电信诈骗
- “高产”魅族再出新机:魅蓝MAX对标小米MAX
- 通过socket进行TCP通信丢包原因总结
- 租用游艇问题
- listview和checkbox点击事件冲突解决
- linux日志目录介绍
- list简单模拟实现
- 众里寻它千百度?不如找DataFox探个底细
- 妙健康获南京软博会“十大创新产品”奖
- 三星全球召回Note7独中国例外
- 文件共享服务 FTP,NFS 和 Samba服务简介和搭建方法
- Apple Pay未竟的事业,小米支付能逆袭吗?
- 平摊分析之动态表的扩张与收缩分析