Tags down


Bottom navigation doesn't show fragments in android jet pack navigation graph

By : notimportant
Date : September 16 2020, 09:00 AM
seems to work fine try to check the package name of the fragment and fragment name attr in navgraph
code :

Share : facebook icon twitter icon

Android bottom navigation fragments issue

By : Behzad. M
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I'm using bottom navigation with fragments in my activity. I have four fragments for each navigation item. Everything works fine, except one moment. In onCreate i use this code to load first fragment when activity created:
code :
Activity is recreated after each rotation by default.

how to navigate one navigation graph to another in android jet pack navigation controller

By : user1971704
Date : March 29 2020, 07:55 AM
With these it helps You can use startActivity method to navigate to another navigation eg :
activity?.startActivity(Intent(activity,HomeActivity::class.java)) in kotlin

how to remove bottom navigation view and toolbar in some fragments if using navigation controller?

By : user2372140
Date : March 29 2020, 07:55 AM
Any of those help More concise is to use a navigationlistener. This way you only need 1 function in your MainActivity and no code in all the fragments where you want to hide the bottomnavigation or any other UI element (like toolbar). Place this function inside your onCreate from your MainActivity.
My function looks like this:
code :
private fun visibilityNavElements(navController: NavController) {
    navController.addOnDestinationChangedListener { _, destination, _ ->
        when (destination.id) {
            R.id.missionPhotoFragment -> bottom_nav?.visibility = View.GONE
            else -> bottom_nav?.visibility = View.VISIBLE

How to make a navigation graph for bottom navigation ? and is there a way to modify the back stack behavior?

By : LuisLoriente
Date : March 29 2020, 07:55 AM
Does that help NavigationUI.setupWithNavController(mainBottomnavigation, navController) already creates the proper OnNavigationItemSelectedListener for you, so you should remove your MainBottomNavigationControl entirely - it is unneeded.

Android Navigation Bottom Fragments overlapping

By : user3442541
Date : March 29 2020, 07:55 AM
Hope that helps I have used navGraph in my fragment in the XML file previously and I've forgotten to delete the navGraph, so it was showing the first fragment in the navGraph in the background.
Related Posts Related Posts :
  • Hide item from List
  • How to return a single int value from DAO query?
  • how do I create a drawable circle?
  • How to add a owner AES key to AndroidKeyStore?
  • Downloading a text file as string
  • Is it possible to refresh LiveData created by delegation?
  • What is name of the bottom bar as shown in the image?
  • Unable to run mksdcard.exe SDK tool android v3.5.2 at windows10
  • How to remove timezone value after retrieving data from cloud firestore?
  • I need suggestion how can I achieve this kind of UI in android?
  • Android - Get text from one textView and set to another with Android Data Binding
  • Android Studio: check where the file is created in code
  • emulator-headless not found
  • Flutter: Difference between Raw Material Button and Material Button
  • Flutter - How to reduce App Size on Device
  • App crashed with error java.lang.IllegalArgumentException: Layout: -72 < 0
  • ERROR: Failed to resolve: androidx.appcompat:design:1.0.2
  • Gradle Kotlin DSL: Inspection "Newer Library Versions Available" not working
  • Data binding compilation error with koin and ViewModel
  • Cant pull/push git from Android studio 4.0 canary
  • Anyone knows where is "start in background" permission in MIUI 11?
  • 'ViewModelProviders' is deprecated. Java solution?
  • How to Split a Layout into two equal rows?
  • How to log user out of one phone when they sign in another - Kotlin Firebase
  • Installation did not succeed. The application could not be installed. Installation failed due to: '-26' Retry
  • YouTube API Exception In Initializer Error
  • Kotlin - Creating consecutive fragments adds the data in the wrong container
  • How to find a clicked place or path VectorDrawable
  • Conditional code for different xml version folder (NavigationView)
  • How to use Retrofit's suspend functions with AS 4.0 and compose enabled?
  • Showing an overlay view under the status bar in AccessibilityService on Pie
  • Is it possible to convert an Android Fragment into Flutter Widget?
  • MediaManager volume control for Xamarin.Forms
  • custom ArrayAdapter showing only one object
  • Add Eigen to android
  • How can i create new react native App using npx?
  • jks or pkcs12: which one should I use to sign the apk for Google Play Store?
  • Drawable images in List not displaying on Android Studio. (Kotlin)
  • Set screenOrientation to "portrait" in release build only
  • FlutterActivity MethodChannel and FlutterView
  • Make a Firebase Firestore collection available offline
  • Android Emulator Error - Failed to open ..../joshuaduong/..../qemu.conf, err: 2
  • Flutter - Rebuild parent after calling setState in grandchildren
  • Koin java.lang.NoClassDefFoundError: Failed resolution of: Lorg/koin/dsl/context/ParameterHolderKt
  • Netinfo.isConnected always returns true in Android
  • How can I increase OpenCV realtime detector app's fps?
  • Can a Flutter app be proposed on the Huawei AppGallery?
  • How to get current latitude and longitude and show in a toast?
  • How important is the Android package name?
  • Android keyboard hides input in web view
  • In recyclerView, it seems like one cardView takes whole list view
  • Flutter assign text onchange value to variable
  • How to scroll a ListView without using NestedScrollView?
  • How to open (audio) file from file manager using Flutter app
  • React native - When i lock the screen while API call loading, App process stopped
  • Flutter GoogleMap is blank after resuming from background
  • Difference between APK extension(OBB file) and app Bundle
  • Why is DAO defined as fun in RoomDatabase?
  • How Android localization works
  • Android: Cannot use TabLayout in my design even after migration to Android X
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk