Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – Kotlin navigate Drawer menu programmatically

Posted on November 11, 2022 By

Solution 1 :

Just make the navigation to the nav_map launchSingleTop true.

And it is safe to use the androidx.navigation.fragment findNavController()

Hope it might help you..

Problem :

I am looking to navigate from Home Fragment to a maps fragment by a button click without needing to open the navigation drawer.

I have used

requireView().findNavController().navigate(R.id.action_nav_home_to_nav_maps)

but this just overrides the set fragment view to the maps fragment and if I navigate back I then have 2 of the same fragment views within the drawer, is it possible to programmatically navigate the same way as if I clicked the Maps fragment in the drawer.

READ  [FIXED] How to get rid of these weird border lines around my flutter code? (flutter in android studio)
Powered by Inline Related Posts
Android Tags:android, android-studio, kotlin

Post navigation

Previous Post: [FIXED] android.media.ImageWriter produces green screen screen on every second posted Image frame
Next Post: [FIXED] android – Notifee native module not found

Related Posts

[FIXED] java – How to check if user is already signed in via gmail or google account? Android
[FIXED] android – Writing Java Application as jar and as apk Android
[FIXED] android – Databinding – Lambda expression must be resolved to its setter first to get the type Android
[FIXED] android – How to scroll Jetpack Compose screen that overflows its contents? Android
[FIXED] java – Not able to extract sdkmanager to install api “android 25” Android
[FIXED] Show Image in Android as a result of REST API Respone Header Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Which is stronger 19 gauge or 23 gauge?
  • Does BMW still use GM transmissions?
  • Is primary or secondary market research better?
  • What does it mean when ADT says low battery?
  • Can a baby sleep on a regular mattress?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme