mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
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:
parent
b0bc8d0532
commit
b6d3a3f7c6
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue