Persist width & height to Parcelables

Makes sure value is persisted when passing from an activity to
another

Change-Id: I9ad12bd794cb3bceb7cf94246bc40f4b80d4815b
GitHub: https://github.com/wikimedia/apps-android-commons/pull/12
This commit is contained in:
YuviPanda 2013-06-17 21:19:46 +00:00 committed by SuchABot
parent b0bc8d0532
commit b6d3a3f7c6

View file

@ -158,6 +158,8 @@ public class Media implements Parcelable {
parcel.writeSerializable(dateUploaded);
parcel.writeString(creator);
parcel.writeSerializable(tags);
parcel.writeInt(width);
parcel.writeInt(height);
}
public Media(Parcel in) {
@ -170,6 +172,8 @@ public class Media implements Parcelable {
dateUploaded = (Date) in.readSerializable();
creator = in.readString();
tags = (HashMap<String, Object>)in.readSerializable();
width = in.readInt();
height = in.readInt();
}
public void setDescription(String description) {