I have a ScrollView on top of another view(with Buttons). The ScrollView is taking the whole screen and is obscuring the view that is beneath it.
At some point in my app I need the ScrollView to be disabled (but still visible) and transfer all the touch events to the Buttons that are beneath the ScrollView. How can I do that? Some views like Buttons are automatically doing that when disabled but a ScrollView is not doing that.
Try to implement your own
ScrollViewwhich has a flag to indicate the status(disabled/enabled) and also overrides theonTouchEventanddispatchTouchEventto let the touch events get pass theScrollView. Here is an example:Then all you have to do is change the value of that flag. See if it works.