Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
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()
).