Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

解决navigation 跳转到底部底部导航栏不能点击当前tab前面的其他tab的方法 #125

Description

@karai-oss

原因 : 是因为使用navigate方法进行跳转到底部tab时 会对队列中的fragment标识进行判断 如果队列中有就不会在加进去 如果没有才会加进去 所有 只需要在跳转之前 使用 navController.popBackStack(); 即可。

NavController navController = ((NavHostFragment) requireParentFragment()).getNavController();
navController.popBackStack();
navController.navigate(R.id.navigation_dashboard);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions