Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class Station implements Parcelable {
private int mId;
private int mNo;
private String mName;
public Station() {
// getters and setters...
public int describeContents() {
return 0;
private void readFromParcel(Parcel in) {
mId = in.readInt();
mNo = in.readInt();
mName = in.readString();
public void writeToParcel(Parcel dest, int flags) {
private Station(Parcel in) {
public static final Parcelable.Creator<Station> CREATOR = new Parcelable.Creator<Station>() {
public Station createFromParcel(Parcel source) {
return new Station(source);
public Station[] newArray(int size) {
return new Station[size];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.