Created
February 6, 2024 10:23
-
-
Save yccheok/b107d7824576cf179ecc1d3ecba1856f to your computer and use it in GitHub Desktop.
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 enum FragmentType implements Parcelable { | |
Notes, | |
Archive, | |
Trash, | |
Backup; | |
public static final Parcelable.Creator<FragmentType> CREATOR = new Parcelable.Creator<FragmentType>() { | |
public FragmentType createFromParcel(Parcel in) { | |
return FragmentType.valueOf(in.readString()); | |
} | |
public FragmentType[] newArray(int size) { | |
return new FragmentType[size]; | |
} | |
}; | |
@Override | |
public int describeContents() { | |
return 0; | |
} | |
@Override | |
public void writeToParcel(Parcel parcel, int flags) { | |
parcel.writeString(this.name()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment