Merge pull request #1371 from mfietz/issue/1370-gpodnettag

Provide Parcelable.Creator object called CREATOR
This commit is contained in:
Tom Hennen 2015-11-10 19:51:22 -05:00
commit 63020ec4ce
1 changed files with 15 additions and 5 deletions

View File

@ -20,11 +20,10 @@ public class GpodnetTag implements Parcelable {
this.usage = usage; this.usage = usage;
} }
public static GpodnetTag createFromParcel(Parcel in) { protected GpodnetTag(Parcel in) {
final String title = in.readString(); title = in.readString();
final String tag = in.readString(); tag = in.readString();
final int usage = in.readInt(); usage = in.readInt();
return new GpodnetTag(title, tag, usage);
} }
@Override @Override
@ -56,5 +55,16 @@ public class GpodnetTag implements Parcelable {
dest.writeInt(usage); dest.writeInt(usage);
} }
public static final Creator<GpodnetTag> CREATOR = new Creator<GpodnetTag>() {
@Override
public GpodnetTag createFromParcel(Parcel in) {
return new GpodnetTag(in);
}
@Override
public GpodnetTag[] newArray(int size) {
return new GpodnetTag[size];
}
};
} }