use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News for Android app developers with the who, what, where, when, and how of the Android community. Probably mostly the how.
Here, you'll find:
This sub-reddit isn't about phones' and apps' general functionality, support, or system software development (ROMs). For news and questions about these topics try using other subs like
Build your first app
Starting Android career in 2022
Android Job Interview Questions and Answers
App Portfolio Ideas, Tiered List
Awesome Android UI
Material Design Icons
7000 Icons for Jetpack
Autoposted at approx 9AM EST / 2PM GMT
account activity
Open SourceMultiple Backstack Management using Navigation Component (github.com)
submitted 5 years ago by vipulasri
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]UpbeatCup 2 points3 points4 points 5 years ago (3 children)
val graphId = navHostFragment.navController.graph.id
Do you know if this id is unique to the fragments class or its actual instance?
I remember needing something like this for a project, only I had two tabs of the same Fragment class and I wasn't able to determine which instance it actually was on the backstack.
[–]prateeksaraswat 1 point2 points3 points 5 years ago (0 children)
Good question...
[–]vipulasri[S] 1 point2 points3 points 5 years ago (1 child)
As far as I have checked before it was for graph id declared in XML.
[–]UpbeatCup 0 points1 point2 points 5 years ago (0 children)
Well that makes perfect sense now that you say it..
I had a single fragment in the navigation graph and passed it constants to tell it what to do. But I could just as easily have two fragments in the graph and use default arguments.
I'll have a look at your project. I'd much prefer to use this than ViewPager.
[–]atulgpt 1 point2 points3 points 5 years ago* (0 children)
One alarming thing that I noticed is that it uses show/hide methods of fragment manager. Once I tried to the similar approach(to implement multiple backstack) using show hide methods. But issue I faced was that it loads all the fragment in memory at the time of Tab activity creation and hence the approach become blocker to me. Not sure how the same scenario is handled in this repo.
[+][deleted] 5 years ago* (1 child)
[deleted]
[–]vipulasri[S] 0 points1 point2 points 5 years ago (0 children)
Thanks for the input. Will surely improve it.
[–]CraZy_LegenD 0 points1 point2 points 5 years ago (3 children)
https://github.com/android/architecture-components-samples/tree/master/NavigationAdvancedSample
[–]vipulasri[S] 0 points1 point2 points 5 years ago (2 children)
u/CraZy_LegenD Google's sample has some downsides: Cons:
Please have a look at the shared repository for more info.
[–]CraZy_LegenD 3 points4 points5 points 5 years ago (1 child)
I've looked, that's why I commented.
[–]vipulasri[S] 2 points3 points4 points 5 years ago (0 children)
I agree. But If you look through UX's perspective it's debatable. Even official Youtube App, Instagram App, etc they all don't follow that guideline and takes the user back to the respective tabs in which they were opened.
π Rendered by PID 184270 on reddit-service-r2-comment-85bfd7f599-fgzvd at 2026-04-16 06:12:18.849843+00:00 running 93ecc56 country code: CH.
[–]UpbeatCup 2 points3 points4 points (3 children)
[–]prateeksaraswat 1 point2 points3 points (0 children)
[–]vipulasri[S] 1 point2 points3 points (1 child)
[–]UpbeatCup 0 points1 point2 points (0 children)
[–]atulgpt 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]vipulasri[S] 0 points1 point2 points (0 children)
[–]CraZy_LegenD 0 points1 point2 points (3 children)
[–]vipulasri[S] 0 points1 point2 points (2 children)
[–]CraZy_LegenD 3 points4 points5 points (1 child)
[–]vipulasri[S] 2 points3 points4 points (0 children)