Closed palaima closed 7 years ago
Demonstration for issue.
NewTransferController
-> RecipientController
-> Back (works as expected)
NewTransferController
-> RecipientController
--->>> NewTransferController
is not detached
This is what I see in logs.
NewTransferController@9b192ee || CREATE
NewTransferController@9b192ee || CREATE_VIEW
NewTransferController@9b192ee || ATTACH
RecipientController@3633e34 || CREATE
RecipientController@3633e34 || CREATE_VIEW
RecipientController@3633e34 || ATTACH
NewTransferController
is not detached
Even so RecipientController
receives all touch events
Got 100% reproducible way.
Let's say Controller's layout root component is SwipeRefreshLayout
Open that controller. Swipe down. While spinner is showing push other Controller -> this issue
If you wrap SwipeRefreshLayout
into e.g. FrameLayout
everything works as expected.
Checkout my fork https://github.com/palaima/Conductor
There is demo app (myapplication
) which represents this issue.
Change R.layout.controller_child_1
to R.layout.controller_child_1_issue
I haven't used SwipeRefreshLayout too much, but it does some weird stuff. I don't believe this is actually related to Conductor, since replacing your toChild2()
method with this:
@OnClick(R.id.to_child_2)
public void toChild2() {
((ViewGroup)getView().getParent()).removeView(getView());
}
doesn't seem to work either. I'll keep looking into it, just posting what I've found so far.
Calling refreshLayout.setEnabled(false);
right before starting the transition does work if you need a quick workaround.
For the record we also had similar problem in our app when using SwipeRefreshLayout
and Conductor
. It was solved with some weird workaround too (I'd have to dig in to find which one exactly...)
After further investigation, this is an issue with the support lib. Here's a link to a bug report on it, where a Google engineer posts a workaround:
https://code.google.com/p/android/issues/detail?id=78062
There are several other open issues that are duplicates of this one. None of the issues I've found have been marked as fixed.
Great! this is not library issue. So I'm closing this issue. Thanks
I'm encountering some rare behaviour which happens time to time and I'm not able to find reproducible path.
There is
RootController
and few child controllers (ChildController1
,ChildController2
)Basically what I'm doing I'm going back and forth from
ChildController1
toChildController2
and sometimesChildController1
is not detached (lifecycle methods are not called) even soChildController2
is attached.BTW, LeakCanary immediately informs that
ChildController1
was leakedDoes anyone encounters such a behaviour?
Happens with
2.x.x
versions