The activity has a homeFragment that contains a viewPager.
homeFragment
viewPager
If I refresh the homeFragment, the viewPager is also regen
You must call the
viewpager.setAdapter(null)
or in kotlin
viewpager.adapter = (null)
It will be reset the ViewPager to start position.