Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@sunnyeverestek and others