Disable scrolling of a ListView contained within a ScrollView

前端 未结 7 1017
迷失自我
迷失自我 2020-12-01 11:46

I want to show a Profile screen for my users.

It must have three views (2 Buttons and a ImageView) and a ListView to show the

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 12:43

    I would add a View with invisible background on top of ListView. Set a View.OnTouchListener() to it. And consume the event by returning true in onTouch() method of View.OnTouchListener().

    When you want the list to be scrolling back again, remove the touch listener set on the transparent View

提交回复
热议问题