android TextView点击事件,第一次无效,第二次才响应的问题

TextView,点击第一次没有反应,点击第二次,出现问题原因是使用了

android:focusableInTouchMode="true"

android:focusableInTouchMode的意思是是否通过touch来获取聚焦,若为true,第一次是获取焦点,第二次才相应click事件,为false,则直接响应。
所以需要将android:focusableInTouchMode设置为false

android:focusableInTouchMode="false"

posted on 2024-09-19 13:01  陈德彪  阅读(192)  评论(0)    收藏  举报

导航