Nested fragment backpress child inside parent have problem

后端 未结 1 1296
情歌与酒
情歌与酒 2020-12-07 04:51

I have nested fragment, fragment inside fragment. Using NavigationBottomView. Everything goes right when I backpress from parent to child fragment.

B

相关标签:
1条回答
  • 2020-12-07 05:32

    You should either use a ViewPager/ViewPager2 with NavHost fragments or implement BottomNavigationView with extension functions Google provided, which basically tags fragments and add them with NavHostFragment.create().

    NavHostFragment takes care of childFragmentManager and back stack management. You can check out examples here if you wish.

    0 讨论(0)
提交回复
热议问题