package com.moral.sharepicturesdemo;
|
|
import android.os.Parcel;
|
import android.os.Parcelable;
|
|
import java.util.ArrayList;
|
|
public class Moment implements Parcelable {
|
public String content;
|
public ArrayList<String> photos;
|
|
@Override
|
public int describeContents() {
|
return 0;
|
}
|
|
@Override
|
public void writeToParcel(Parcel dest, int flags) {
|
dest.writeString(this.content);
|
dest.writeStringList(this.photos);
|
}
|
|
public Moment() {
|
}
|
|
public Moment(String content, ArrayList<String> photos) {
|
this.content = content;
|
this.photos = photos;
|
}
|
|
protected Moment(Parcel in) {
|
this.content = in.readString();
|
this.photos = in.createStringArrayList();
|
}
|
|
public static final Creator<Moment> CREATOR = new Creator<Moment>() {
|
@Override
|
public Moment createFromParcel(Parcel source) {
|
return new Moment(source);
|
}
|
|
@Override
|
public Moment[] newArray(int size) {
|
return new Moment[size];
|
}
|
};
|
}
|