onClick not triggered on LinearLayout with child

后端 未结 15 1082
生来不讨喜
生来不讨喜 2020-11-29 03:33

I\'ve got a custom LinearLayout with a smaller TextView child. I\'d like to be able to click the area not covered by the TextView, so I set clickable=true and an onclicklist

15条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 03:50

    None of the solutions above forked for me. Than i noticed that a LinkMovementMethod set to TextView inside my LinearLayout. This class intercepts touch events, click events and properties of TextView such as clickable, focusable vs..

提交回复
热议问题