Created
July 6, 2019 10:56
-
-
Save matthew-carroll/036f0bd040b0c75594d4a46ad7d3c755 to your computer and use it in GitHub Desktop.
Implementing of dispatchSaveInstanceState() in ViewGroup for Android.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void dispatchSaveInstanceState(SparseArray<Parcelable> container) { | |
super.dispatchSaveInstanceState(container); | |
final int count = mChildrenCount; | |
final View[] children = mChildren; | |
for (int i = 0; i < count; i++) { | |
View c = children[i]; | |
if ((c.mViewFlags & PARENT_SAVE_DISABLED_MASK) != PARENT_SAVE_DISABLED) { | |
c.dispatchSaveInstanceState(container); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment