Android Jetpack Navigation with ViewPager and TabLayout

前端 未结 5 809
面向向阳花
面向向阳花 2020-12-13 10:09

For a new app i use Jetpack Navigation Library to implement proper back navigation. The first level of navigation is a navigation drawer which works fine with jetpack naviga

5条回答
  •  再見小時候
    2020-12-13 10:35

    Experimented with different approaches to handle TabLayout with Jetpack Navigation. But hit issues like having a full history of switching between tabs multiple times etc.

    Browsing known Google Android Issues before raising a request for a demo, I found this existing issue.

    Its status is Closed marked as Intended Behavior with the following explanation:

    Navigation focuses on elements that affect the back stack and tabs do not affect the back stack - you should continue to manage tabs with a ViewPager and TabLayout - Referring to Youtube training.

提交回复
热议问题