Skip to content

Instantly share code, notes, and snippets.

@makzimi
Created November 2, 2022 21:20
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 makzimi/46021b84ab1f9e5d7cf6bc64ccfa829c to your computer and use it in GitHub Desktop.
Save makzimi/46021b84ab1f9e5d7cf6bc64ccfa829c to your computer and use it in GitHub Desktop.
TransactionTooLargeException_article_FragmentManager.java
Parcelable saveAllState() {
...
int N = mActive.size();
FragmentState[] active = new FragmentState[N];
for (int i=0; i<N; i++) {
...
//saving all states in active array
...
}
...
FragmentManagerState fms = new FragmentManagerState();
fms.mActive = active;
...
return fms;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment