ScrollView with Buttons inside, no response until second click on any button inside

后端 未结 4 666
-上瘾入骨i
-上瘾入骨i 2020-12-13 22:25

I\'ve been a couple of days trying to solve this thing but I can\'t figure it out. The problem is, simple activity, with simple layout, ScrollView -> LinearLayout -> and a l

4条回答
  •  [愿得一人]
    2020-12-13 22:58

    I've been able to fix this by overriding onScrollChanged, then sending the ScrollView a MotionEvent via OnTouchEvent when the bounds are reached to simulate a user touch.

    It's the hackiest, dirtiest programming I can imagine, but it works ok in my application. This app is for phones running 2.2 only, and this bug needed to be fixed somehow.

    If anyone has a better solution please let me know.

    Edit: This problem is only in 2.2 btw, they've fixed it in 2.3, and it wasn't an issue in 2.1.

提交回复
热议问题