Category : uinavigationcontroller

I’m using navigation component ‘androidx.navigation:navigation-fragment-ktx:2.3.3’ ‘androidx.navigation:navigation-ui-ktx:2.3.3′ I don’t understand why when I’m navigating from my startDestination to the next Fragment I get a short blinking and I see the previous activity for a couple of millisec. This doesn’t happen when I’m navigating to different fragments. This happens with and without the navigation animations. Tried with ..

Read more

Please, I integrated the new Navigation Controller Component, using navHostFragment. My project runs on one activity-to-many fragments. It got a drawer & toolbar. I read that it is possible to set the ids in both menus (drawer, toolbar), to same ids in nav_graph for navigation when onClick event occurs. activity_main.xml <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" ..

Read more

My application has 4 screens: Login, Home, Profile, Settings. Login is the start screen. Then there is the Main screen where the BottomNavigationView switches 3 other screens. I made 2 navigation graphs: the first for the Login-Main fragments, the second for the Home-Profile-Settings fragments. The second graph was attached to the BottomNavigationView. And it works ..

Read more

In my app im able to open two fragments by clicking 2 different menu items in the toolBar like in this code: override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.action_signout -> { FirebaseAuth.getInstance().signOut() return true } R.id.search -> { navController.navigate(R.id.nav_service_search) if (fragmentManager.findFragmentById(R.id.userInfoFragment) != null) { navController.popBackStack(R.id.userInfoFragment, false) } return true } R.id.user_account -> ..

Read more

Let me explain the whole thing, just in case. I’m using BottomNavigationView with Jetpack’s Mobile Navigation graphs and so. I reimplemented the method: NavigationUI.setupWithNavController(…) during navigation setup, instead of using this method I made a very similar: customSetupWithNavController(…) the only changes I made was to change de default fading transition between fragments, and started to ..

Read more

I am facing the following problem. I have one Activity with four Fragments. Three of them are in DrawerLayout as Items. Around those three Fragments everything works fine. However, when I change to the last one, let’s say TestFragment, that is not in DrawerLayout, by using navController.navigate(R.id.nav_test), and then come back to the HomeFragment by ..

Read more