Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
jb...@google.com <jb...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
Description
As mentioned in https://issuetracker.google.com/173472486 , complementary operations now cancel each other out.
We should create a lint warning notifying developers that using
attach()
anddetach()
in the same transaction on the same fragment will no longer destroy and recreate the fragment's view like it used to and if they want this behavior they should separate them into two separate transactions.This bug is only for detecting the same usage, in the future it would be nice if we had two lint rules that specifically address the differences in ordering of these methods (i.e. doing an
detach()
thenattach()
vs doing anattach()
thendetach()
).