In my android application, I have a scroll view which has a lot of children view.
How can I listen for an event when a view is switching from visible to ‘non visible to user’ due to user’s scroll action?
In my android application, I have a scroll view which has a lot of
Share
So the default ScrollView does not provide any sort of scroll listener, but it does call
onScrollChanged()when the user scrolls, so you can implement your own:Now in your
onScrollChangedyou can go through your Views and check if they are visible: