Skip to content

Commit

Permalink
Merge pull request #301 from pennlabs/dining_fix
Browse files Browse the repository at this point in the history
Dining menu parcelable fix
  • Loading branch information
adelq committed Dec 5, 2015
2 parents 55863f4 + da51ffd commit b0ca159
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,35 @@ public String nextMeal() {
* Created by Adel on 12/18/14.
* Class for a single menu, ie. Lunch, Dinner
*/
public static class Menu {
public static class Menu implements Parcelable{
@SerializedName("txtDayPartDescription") public String name;
@SerializedName("tblStation") public List<DiningStation> stations = new ArrayList<>();

protected Menu(Parcel in) {
name = in.readString();
}

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

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

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

@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
}
}

/**
Expand Down

0 comments on commit b0ca159

Please sign in to comment.