Button需要点击两次才触发点击事件问题

解决:

android:focusableInTouchMode="true"

检查以上的属性是否存在,如果存在,直接删除解决。

android:focusableInTouchMode属性设置为true,

当触摸某个控件时,会先将焦点移动到被触摸的控件上。

然后需要再触摸该控件才会响应单击事件。

posted @ 2022-01-08 20:33  jiduoduo  阅读(1501)  评论(0)    收藏  举报