stop scrollView in the middle of the scroll

Deepak Senapati picture Deepak Senapati · Jun 26, 2013 · Viewed 14.4k times · Source

I have a scrollview with a lot of content. Now when user do a fling or scroll down, I want the scrollview to stop at a particular view location, where I am doing some animation, and then user can again fling or scroll down.

I have tried the disabling of scrollview as mentioned here but It only disables when the scrollview completely stops and cannot stop in the middle of a fling.

Is there any way I can stop a fling of the scrollview when a certain view location or a certain y value is reached?

Answer

Yayo Arellano picture Yayo Arellano · Jul 7, 2016

I had the same problem my solution was.

listView.smoothScrollBy(0,0)

This will stop the scrolling.