I have a scrollView in my ViewPager fragment. I want to set the initial scrollView position to (0,100).
I tried setting scrollView.scrollTo(0,100)
in onCreateView()
. It didn't work.
Then I tried the same in Handler and it worked but it only scrolls to (0,100) after (0,0) causing little jerk in scrollView which is bad for user experience.
Is there any way to to make scrollview directly scroll to (0,100) instead of (0,0)? or Is there any method available in scrollView to detect initial scroll event?
P.S :I saw the question here which also the same as mine but the accepted answer is not working for me.
Any help would be appreciated. Thanks