Open ghost opened 7 years ago
public class DataForBinding implements Parcelable { public ArrayList<BarEntry> barEntries; public ArrayList<CandleEntry> candleEntries; public ArrayList<Entry> lineEntries; public DataForBinding() { } protected DataForBinding(Parcel in) { candleEntries = in.readArrayList(CandleEntry.class.getClassLoader()); barEntries = in.readArrayList(BarEntry.class.getClassLoader()); lineEntries = in.readArrayList(Entry.class.getClassLoader()); } public static final Creator<DataForBinding> CREATOR = new Creator<DataForBinding>() { @Override public DataForBinding createFromParcel(Parcel in) { return new DataForBinding(in); } @Override public DataForBinding[] newArray(int size) { return new DataForBinding[size]; } }; @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeList(barEntries); dest.writeList(candleEntries); dest.writeList(lineEntries); } private void readFromParcel(Parcel in) { } public ArrayList<BarEntry> getBarEntries() { return barEntries; } public void setBarEntries(ArrayList<BarEntry> barEntries) { this.barEntries = barEntries; } public ArrayList<CandleEntry> getCandleEntries() { return candleEntries; } public void setCandleEntries(ArrayList<CandleEntry> candleEntries) { this.candleEntries = candleEntries; } public ArrayList<Entry> getLineEntries() { return lineEntries; } public void setLineEntries(ArrayList<Entry> lineEntries) { this.lineEntries = lineEntries; } }
its wrong ,how to write correctly
Answered on StackOverflow:
http://stackoverflow.com/questions/43121992/parcelable-objct-with-another-types-mpandroidchart/43166651
its wrong ,how to write correctly