Created
February 15, 2014 03:07
-
-
Save oguya/9013995 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 class saveAsParcel implements Parcelable { | |
private String myStringValue; | |
public PassableObject() {} | |
public PassableObject(Parcel inParcel) { | |
myStringValue = inParcel.readString(); | |
} | |
@Override | |
public int describeContents() { | |
return 0; | |
} | |
@Override | |
public void writeToParcel(Parcel outParcel, int flags) { | |
outParcel.writeString(myStringValue); | |
} | |
public String getMyStringValue() { | |
return myStringValue; | |
} | |
public void setMyStringValue(String myStringValue) { | |
this.myStringValue = myStringValue; | |
} | |
public static final Parcelable.Creator<PassableObject> CREATOR | |
= new Parcelable.Creator<PassableObject>() { | |
public PassableObject createFromParcel(Parcel in) { | |
return new PassableObject(in); | |
} | |
public PassableObject[] newArray(int size) { | |
return new PassableObject[size]; | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment