|
@@ -8,6 +8,8 @@ import android.content.Intent;
|
|
|
import android.content.IntentFilter;
|
|
import android.content.IntentFilter;
|
|
|
import android.graphics.Color;
|
|
import android.graphics.Color;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
|
|
+import android.os.Parcel;
|
|
|
|
|
+import android.os.Parcelable;
|
|
|
import android.support.annotation.Nullable;
|
|
import android.support.annotation.Nullable;
|
|
|
import android.support.v4.app.Fragment;
|
|
import android.support.v4.app.Fragment;
|
|
|
import android.support.v4.content.LocalBroadcastManager;
|
|
import android.support.v4.content.LocalBroadcastManager;
|
|
@@ -39,13 +41,46 @@ import java.util.ArrayList;
|
|
|
public class KPIFragment extends Fragment implements KPICell.KPIListener {
|
|
public class KPIFragment extends Fragment implements KPICell.KPIListener {
|
|
|
|
|
|
|
|
|
|
|
|
|
- private static class KPIModel implements Serializable {
|
|
|
|
|
|
|
+// private static final long serialVersionUID = 2873400198824958986L;
|
|
|
|
|
+
|
|
|
|
|
+ private static class KPIModel implements Serializable,Parcelable {
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -6280156291692980527L;
|
|
private static final long serialVersionUID = -6280156291692980527L;
|
|
|
ArrayList<PieChartView.ChartItem> items;
|
|
ArrayList<PieChartView.ChartItem> items;
|
|
|
String name;
|
|
String name;
|
|
|
int total;
|
|
int total;
|
|
|
|
|
|
|
|
|
|
+ protected KPIModel(Parcel in) {
|
|
|
|
|
+ name = in.readString();
|
|
|
|
|
+ total = in.readInt();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public KPIModel() {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void writeToParcel(Parcel dest, int flags) {
|
|
|
|
|
+ dest.writeString(name);
|
|
|
|
|
+ dest.writeInt(total);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public int describeContents() {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public static final Creator<KPIModel> CREATOR = new Creator<KPIModel>() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public KPIModel createFromParcel(Parcel in) {
|
|
|
|
|
+ return new KPIModel(in);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public KPIModel[] newArray(int size) {
|
|
|
|
|
+ return new KPIModel[size];
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static class Month implements Serializable {
|
|
private static class Month implements Serializable {
|