Reputation: 2214
I've got a scrollview that is on a Fragment that is on a ViewPager and I want to scroll it to some position on start, after pager.setCurrentItem(numberOfPage);
where numberOfPage is a remembered last page.
So , if I do scrollTo() in a Fragment onCreateView() - it wouldn't scroll anywhere because it just creates view and not yet inflate it, so it doesn't scroll
I would of scroll it in a onPageSelected(int position)
in Activity, but it works only on manually selected ViewPager's fragment and I'm setting it in the beginning as I already mentioned.
So, how can I scroll it right after Inflation?
Upvotes: 0
Views: 2600