Android LinearLayout 嵌套 button 监听LinearLayout的onClickListener事件出现问题

来源:互联网 发布:神硕微营销软件下载 编辑:程序博客网 时间:2024/05/16 02:37

解决方法:

1.在LinearLayout的属性增加 android:descendantFocusability="blocksDescendants"

2.将button换成imageview,在imageview的属性增加android:focusable="false"

0 0
原创粉丝点击