Comments (8)
I am pushing out a fix right now for 1.2.5. I am not 100% sure that it will fix the issue, because I am surprised it is happening the way it is now. Give it a shot and if you continue to see it, let me know.
from fragnav.
Thank you for the response.
I will try it.
from fragnav.
Could you update to 1.2.4 and see if you're still experiencing the issue?
from fragnav.
Uh, sorry, my bad. I am using 1.2.4
. Updated comment.
from fragnav.
Got it. Should be a fairly easy fix. I should be able to post a fix in the next couple of days.
from fragnav.
Great! Thanks!
Offtopic: Do you suggest using Fragment getRootFragment(int index)
over giving a list of fragments on initialization?
from fragnav.
There's no inherent performance advantage to using one over the other. Using getRootFragment performs lazy initialization of the object vs creating them all at once when you first initialize
FragNav, so technically those are different, but the difference in minimal. Really it's about three things:
- If you don't know what the root fragments for each tab will be on creation, (i.e., until you actually click on it, you may not know what it's going to be) then you need getRootFragment.
- Overriding. If you have a base class that's implementing RootFragmentListener, there's some cases where it's nice for the base class to handle a couple of tabs, and then the subclasses handle indexes that are unique to them.
- Preference. No real reason behind this one, but to me having a function returning what the fragments are seems a bit clearer/cleaner. I can totally see the opposite argument being made and that having a list being made at construction being a bit clearer. So whichever makes the most sense to you, I wanted to have both.
(Theoretically there's a 4th point, which is that if for some reason that rootFragment is lost, it can still call that function and get a newInstance of the fragment. This was handled in the earlier days as a safety precaution, but in reality, if the library is well built, should never have to happen.)
from fragnav.
I experienced this bug too. Now using 1.2.5 hope no crash anymore.
Thank you for the fix
from fragnav.
Related Issues (20)
- 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
- Issue with previous fragment while switch the tabs
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.