Skip to content

Instantly share code, notes, and snippets.

@joseprl89
Created May 25, 2018 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseprl89/cd98f9a9e7e96c2f10bc73a9c80d273b to your computer and use it in GitHub Desktop.
Save joseprl89/cd98f9a9e7e96c2f10bc73a9c80d273b to your computer and use it in GitHub Desktop.
public void onDestroy() {
mCalled = true;
// Use mStateSaved instead of isStateSaved() since we're past onStop()
if (mViewModelStore != null && !mHost.mFragmentManager.mStateSaved) {
mViewModelStore.clear();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment