Use parcelable to store item as sharedpreferences?
问题 I have a couple objects, Location, in my app stored in an ArrayList and use parcelable to move these between activities. The code for the object looks like this: public class Location implements Parcelable{ private double latitude, longitude; private int sensors = 1; private boolean day; private int cloudiness; /* Måste ha samma ordning som writeToParcel för att kunna återskapa objektet. */ public Location(Parcel in){ this.latitude = in.readDouble(); this.longitude = in.readDouble(); this