Comments (5)
This may be an oversight on my part, but my understand of ChildFragmentManagers is that it nests a fragment inside of another fragment, which isn't exactly the primary use case here. This library is more for the use case where you want to entirely replace another fragment. Feel free to correct me if I'm wrong though.
from fragnav.
If you think of the top level of fragments as navigation controllers. For example if you have five tabs you have five fragments acting as navigation controllers. Each navigation controller has a base(root) fragment. You can push more fragments in that navigation controller. If you want to switch to another tab you can detach the navigation controller and attach the other navigation controller. When you go back and reattach the previously detached navigation controller you will have all of the backstack for the nav controller persisted by the child fragment managers.
from fragnav.
This is pretty far overdue, but I've been considering this more and more. I'm wondering if anyone has any specific pros/cons to using this method.
from fragnav.
@ncapdevi I don't mean to overstep any bound here (and delete my comment if you'd like), but the task that you are looking to perform is exactly the implementation I have completed. Maybe we can work together on updating your implementation to use my NavigationFragment implementation (My next steps were to make a wrapper around my single navigation stack to help implement tabs and help implement a navigation drawer anyways). Let me know if you would like to work together on implementing this.
As a side note, from my experience so far the only con with using the child fragment manager is that when you start an activity, share intent, etc. it causes the fragment to be detached and hence a blank screen shows prior to the transition/when the share intent shows overtop.
Thanks,
DMCApps
from fragnav.
@DMCApps No overstepping at all, but thanks for the consideration. The whole point of this library was to provide a solution to a specific problem. As far as I'm concerned, the more approaches to solving the problem, the better. I'll have to spend some time looking into your implementation to see what my specific thoughts are, but I'm happy to discuss the differences/pros/cons of the different approaches (if they are that different).
I'm still not entirely sold on the idea of using the child fragment manager vs the fragment manager. I may need to spend some more time looking into the intricacies of the implementation, but my hunch is that using a child fragment manager would be slightly less efficient/performant as well as not necessarily providing any benefits (that I can really see). I'm still interested in the idea of it though.
from fragnav.
Related Issues (20)
- FragNav - Without tabbar HOT 2
- Clear stack fail with fragmentHideStrategy = DETACH_ON_NAVIGATE_HIDE_ON_SWITCH
- How to send argument when switching tab
- What is the best practice show full screen fragment without independent from stack HOT 1
- Code Repetition, Unnecessary Assignment of Variable
- "Unable to instantiate fragment" when restore app from background after a long time HOT 2
- Migration from JCenter HOT 16
- When the current fragment is removed from the stack (fragNavController.popFragment()), the previous fragment is recreated
- How can i push fragment like iOS modal presentation ?
- Sending Parcellables
- FragNavController in Java
- Hide Strategy HOT 1
- How to use Shared Elements Transition with FragNav ? HOT 2
- Memory Leak when the user closes the dialog shown via FragNavController.showDialogFragment
- Implement Deeplink with FragNav
- Cannot find or not found code in Kotlin dsl HOT 1
- recreating activity after screen rotation
- pushFragment PreferenceFragmentCompat
- Failed to resolve: com.ncapdevi:frag-nav:3.2.0 jcenter error HOT 1
- fragments in viewpager not loading on return
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fragnav.