-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ViewPager on back stack calls Presenter's method detachView(retainInstance=true) #271
Comments
Hey, Beside that this is a bug (thanks for reporting), |
Hello @sockeqwe, I want to keep the presenter on a configuration change, that's why I call If I return to Fragment A (by pressing back or popping the back stack), the presenter is recreated anyway, so that's why I set I also noticed if you remove Fragment A from the back stack (go "up"), then Fragment B/C call Thanks for your help, |
See #274. Feel free to reopen this issue if 3.1.0 (snapshot) doesn't solve this porblem. |
Hi Hannes,
I'm having some issues with a
ViewPager
in the back stack.Mosby Version:
mvp-common:3.0.4
andviewstate:3.0.4
Expected behavior
I have a
Fragment
called A that contains aViewPager
that contains Fragments B and C. When Fragment A is put on the back stack, the methoddetachView(retainInstance=false)
gets called. At the same time,detachView(retainInstance=false)
is supposed to be called for Fragments B and C.Actual behavior (include a stacktrace if crash)
When Fragment A is put on the back stack, the following happens:
detachView(retainInstance=false)
detachView(retainInstance=true)
detachView(retainInstance=true)
As you can see, retainInstance is true for both B and C, but it should be false.
Steps to reproduce the behavior or link to a sample repository
setRetainInstance(true)
in theonCreate()
method.new FragmentMvpViewStateDelegateImpl<>(this, this, true, false);
.Thanks, Thomas
The text was updated successfully, but these errors were encountered: