Android Studio – How to replace fragment in ViewPager2
I have migrated ViewPager to ViewPager2 and adapter FragmentPageAdapter to FragmentStateAdaper. In FragmentPageAdapter there is a method called getItemPostion(Object obj) by using this method I can able to replace fragments. In FragmentStateAdaper class that method is not there how to…