// Path: app/src/main/java/com/antest1/kcanotify/KcaResourcelogItemAdpater.java
// public static List<JsonObject> resourceData = new ArrayList<>();


import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.appcompat.widget.AppCompatCheckBox;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ListView;
import android.widget.TextView;
import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.LineData;
import com.github.mikephil.charting.data.LineDataSet;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
import com.github.mikephil.charting.utils.EntryXComparator;
import com.google.gson.JsonObject;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import static android.view.View.GONE;
import static com.antest1.kcanotify.KcaResourcelogItemAdpater.resourceData;
package com.antest1.kcanotify;





public class KcaResoureLogFragment extends Fragment {
    public static final long DAY_MILLISECOND = 86400000;
    public int position;

    final int[][] color_data = {
            { R.color.colorResourceFuel, R.color.colorResourceAmmo, R.color.colorResourceSteel, R.color.colorResourceBauxite},
            { R.color.colorConsumableBucket, R.color.colorConsumableTorch, R.color.colorConsumableDevmat, R.color.colorConsumableScrew}};
    final String[][] data_key = {
            { "res_fuel", "res_ammo", "res_steel", "res_bauxite" },
            { "con_bucket", "con_torch", "con_devmat", "con_screw"}};

    final static int[] maximum = {300000, 3000};

    boolean[] is_draw_enabled = { true, true, true, true };
    static int[] interval = {5000, 100};
    static long xaxis_interval = DAY_MILLISECOND;
    static String xaxis_format = "MM/dd";
    KcaResourcelogItemAdpater adapter = new KcaResourcelogItemAdpater();

    private String getStringWithLocale(int id) {
        return KcaUtils.getStringWithLocale(getContext(), getActivity(), id);
    }

    public static KcaResoureLogFragment create(List<JsonObject> data, int pos) {
        Log.e("KCA", "create " + pos);
// Path: app/src/main/java/com/antest1/kcanotify/KcaResourcelogItemAdpater.java
// public static List<JsonObject> resourceData = new ArrayList<>();


// Path: app/src/main/java/com/antest1/kcanotify/KcaResoureLogFragment.java
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.appcompat.widget.AppCompatCheckBox;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.ListView;
import android.widget.TextView;
import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.LineData;
import com.github.mikephil.charting.data.LineDataSet;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
import com.github.mikephil.charting.utils.EntryXComparator;
import com.google.gson.JsonObject;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import static android.view.View.GONE;
import static com.antest1.kcanotify.KcaResourcelogItemAdpater.resourceData;

package com.antest1.kcanotify;





public class KcaResoureLogFragment extends Fragment {
    public static final long DAY_MILLISECOND = 86400000;
    public int position;

    final int[][] color_data = {
            { R.color.colorResourceFuel, R.color.colorResourceAmmo, R.color.colorResourceSteel, R.color.colorResourceBauxite},
            { R.color.colorConsumableBucket, R.color.colorConsumableTorch, R.color.colorConsumableDevmat, R.color.colorConsumableScrew}};
    final String[][] data_key = {
            { "res_fuel", "res_ammo", "res_steel", "res_bauxite" },
            { "con_bucket", "con_torch", "con_devmat", "con_screw"}};

    final static int[] maximum = {300000, 3000};

    boolean[] is_draw_enabled = { true, true, true, true };
    static int[] interval = {5000, 100};
    static long xaxis_interval = DAY_MILLISECOND;
    static String xaxis_format = "MM/dd";
    KcaResourcelogItemAdpater adapter = new KcaResourcelogItemAdpater();

    private String getStringWithLocale(int id) {
        return KcaUtils.getStringWithLocale(getContext(), getActivity(), id);
    }

    public static KcaResoureLogFragment create(List<JsonObject> data, int pos) {
        Log.e("KCA", "create " + pos);
        resourceData = data;