Android:解决ExpandableListView中添加button后item项点击事件问题

在ExpandableListView中添加button后item项不能点击,获取不到点击事件。

原因:button按钮抢占了ExpandableListView的焦点

解决方法:为button按钮添加android:focusable="false"属性,关闭button获取焦点,ExpandableListView中的项目即可点击。



发布了63 篇原创文章 · 获赞 67 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/sange77/article/details/46593059