张海江
2016-12-21 12ff20edef42257e8046e41ae09b6479549ee7f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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];
        }
    };
}