解决方法:
1.在LinearLayout的属性增加 android:descendantFocusability="blocksDescendants"
2.将button换成imageview,在imageview的属性增加android:focusable="false"
本文介绍了解决Android应用中控件焦点冲突的方法,包括调整LinearLayout属性以阻止子视图获取焦点,以及使用ImageView代替Button并禁用其焦点属性。
解决方法:
1.在LinearLayout的属性增加 android:descendantFocusability="blocksDescendants"
2.将button换成imageview,在imageview的属性增加android:focusable="false"
1410

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