Currently, i have the below adapter implemented with a ViewPager2 instance
upon initial load FeedFragment loads its data and is visible and fine. By the time I scroll away to the 3rd or so fragment and come back, FeedFragment is blank until I touch it and then it reappears. what is causing this blank state?
FragmentStateAdapter(fragmentManager, lifecycle) {
override fun getItemCount(): Int = 5
override fun createFragment(position: Int): Fragment {
// Return a NEW fragment instance in createFragment(int)
return when (position) {
0 -> FeedFragment()
else -> Fragment()
}
}
}