Android实现Parcelable 直接intent传参

protected DBean(Parcel in) {
    id = in.readString();
    cid = in.readString();
    name = in.readString();
    status = in.readString();
    url = in.readString();
    money = in.readString();
}

public static final Creator<DBean> CREATOR = new Creator<DBean>() {
    @Override
    public DBean createFromParcel(Parcel in) {
        return new DBean(in);
    }

    @Override
    public DBean[] newArray(int size) {
        return new DBean[size];
    }
};

@Override
public int describeContents() {
    return 0;
}

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(id);
    dest.writeString(cid);
    dest.writeString(name);
    dest.writeString(status);
    dest.writeString(url);
    dest.writeString(money);
}
上一篇:pillow


下一篇:解决 Qpython pillow 报错“cannot import name ‘_imaging‘ from pil“