Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation Components back stack not working with java code #1046

Open
sunnyeverestek opened this issue Jan 27, 2022 · 0 comments
Open

Navigation Components back stack not working with java code #1046

sunnyeverestek opened this issue Jan 27, 2022 · 0 comments

Comments

@sunnyeverestek
Copy link

NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().findFragmentById(R.id.base_container);

    if (navHostFragment != null) {
        navController = navHostFragment.getNavController();
        NavigationUI.setupWithNavController(viewBind.bottomNav, navController);

        setSupportActionBar(viewBind.appBar.toolbar);
        appBarConfiguration =  new AppBarConfiguration.Builder(R.id.discoveryFragment,R.id.analyticsFragment
        ,R.id.feedFragment,R.id.notificationFragment).build();

        NavigationUI.setupActionBarWithNavController(this,navController,appBarConfiguration);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@sunnyeverestek and others