Verified
Status Update
Comments
yb...@google.com <yb...@google.com> #2
ViewModels need to be cleared on Fragments that are being really destroyed, where "really destroyed" means that they are being destroyed without their state being saved, indicating that there's no chance they are going to be restored at a later time.
Unfortunately, isStateSaved(), despite its name, does double duty as a check on whether it is safe to do Fragment Transactions and is always true after onStop(), meaning it can be true even if the state has really not been saved, oddly enough.
We'll just not use isStateSaved() here and rely on a separate indicator for the "really destroyed" case.
Unfortunately, isStateSaved(), despite its name, does double duty as a check on whether it is safe to do Fragment Transactions and is always true after onStop(), meaning it can be true even if the state has really not been saved, oddly enough.
We'll just not use isStateSaved() here and rely on a separate indicator for the "really destroyed" case.
cc...@google.com <cc...@google.com> #3
@ comment #2 Fixed in which version?
cc...@google.com <cc...@google.com> #5
We have to update compile SDK to 28 to adapt this fix?!
Description
Builders are not meant to be extended. Leaving the class open to extension adds ambiguity to the API.
Consider making this public class final.