Created
January 18, 2017 15:14
-
-
Save nontravis/c2c949cdf7db27e0c37c8a4f02700a3e to your computer and use it in GitHub Desktop.
SwitchViewGroup_savestate
This file contains 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
public class SwitchViewGroup extends BaseViewGroup{ | |
... | |
private static class SavedState extends ChildSavedState{ | |
SavedState( Parcelable superState ){ | |
super( superState ); | |
} | |
private SavedState( Parcel in, ClassLoader classLoader ){ | |
super( in, classLoader ); | |
//put data here | |
} | |
@Override | |
public void writeToParcel( Parcel out, int flags ){ | |
super.writeToParcel( out, flags ); | |
//get data here | |
} | |
public static final ClassLoaderCreator<SavedState> CREATOR = new ClassLoaderCreator<SwitchViewGroup.SavedState>(){ | |
@Override | |
public SwitchViewGroup.SavedState createFromParcel( Parcel source, ClassLoader loader ){ | |
return new SwitchViewGroup.SavedState( source, loader ); | |
} | |
public SwitchViewGroup.SavedState createFromParcel( Parcel in ){ | |
return null; | |
} | |
public SwitchViewGroup.SavedState[] newArray( int size ){ | |
return new SwitchViewGroup.SavedState[size]; | |
} | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment