// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String PREF_AKASHI_STARLIST = "akashi_starlist";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getStringPreferences(Context ctx, String key) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     try {
//         return String.valueOf(pref.getInt(key, 0));
//     } catch (Exception e) {
//         // Nothing to do
//     }
//     return pref.getString(key, "");
// }
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static void setPreferences(Context ctx, String key, Object value) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     SharedPreferences.Editor editor = pref.edit();
//     if (value instanceof String) {
//         editor.putString(key, (String) value);
//     } else if (value instanceof Boolean) {
//         editor.putBoolean(key, (Boolean) value);
//     } else if (value instanceof Integer) {
//         editor.putString(key, String.valueOf(value));
//     } else {
//         editor.putString(key, value.toString());
//     }
//     editor.commit();
// }


import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import androidx.core.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.ArrayList;
import static com.antest1.kcanotify.KcaConstants.PREF_AKASHI_STARLIST;
import static com.antest1.kcanotify.KcaUtils.getStringPreferences;
import static com.antest1.kcanotify.KcaUtils.setPreferences;
        ViewHolder holder = (ViewHolder) v.getTag();
        holder.iconView.setImageResource(item.getEquipIconMipmap());
        holder.nameView.setText(item.getEquipName());
        holder.materialView.setText(item.getEquipMaterials());
        holder.screwView.setText(item.getEquipScrews());
        holder.supportView.setText(item.getEquipSupport());
        holder.materialView.setTextColor(ContextCompat.getColor(context, getMaterialTextColor(isSafeChecked)));
        holder.screwView.setTextColor(ContextCompat.getColor(context, getScrewTextColor(isSafeChecked)));
        if (checkStarred(starlistData, itemId)) {
            holder.starView.setText(context.getString(R.string.aa_btn_star1));
        } else {
            holder.starView.setText(context.getString(R.string.aa_btn_star0));
        }

        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(context, AkashiDetailActivity.class);
                intent.putExtra("item_id", itemId);
                intent.putExtra("item_info", itemImprovementData);
                context.startActivity(intent);
            }
        });

        holder.starView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String starred = getStringPreferences(context, PREF_AKASHI_STARLIST);
                TextView tv = (TextView) v;
                if (tv.getText().equals(context.getString(R.string.aa_btn_star0))) {
// Path: app/src/main/java/com/antest1/kcanotify/KcaConstants.java
// public static final String PREF_AKASHI_STARLIST = "akashi_starlist";
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static String getStringPreferences(Context ctx, String key) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     try {
//         return String.valueOf(pref.getInt(key, 0));
//     } catch (Exception e) {
//         // Nothing to do
//     }
//     return pref.getString(key, "");
// }
// 
// Path: app/src/main/java/com/antest1/kcanotify/KcaUtils.java
// public static void setPreferences(Context ctx, String key, Object value) {
//     SharedPreferences pref = ctx.getSharedPreferences("pref", Context.MODE_PRIVATE);
//     SharedPreferences.Editor editor = pref.edit();
//     if (value instanceof String) {
//         editor.putString(key, (String) value);
//     } else if (value instanceof Boolean) {
//         editor.putBoolean(key, (Boolean) value);
//     } else if (value instanceof Integer) {
//         editor.putString(key, String.valueOf(value));
//     } else {
//         editor.putString(key, value.toString());
//     }
//     editor.commit();
// }


// Path: app/src/main/java/com/antest1/kcanotify/KcaAkashiListViewAdpater.java
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import androidx.core.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.ArrayList;
import static com.antest1.kcanotify.KcaConstants.PREF_AKASHI_STARLIST;
import static com.antest1.kcanotify.KcaUtils.getStringPreferences;
import static com.antest1.kcanotify.KcaUtils.setPreferences;

        ViewHolder holder = (ViewHolder) v.getTag();
        holder.iconView.setImageResource(item.getEquipIconMipmap());
        holder.nameView.setText(item.getEquipName());
        holder.materialView.setText(item.getEquipMaterials());
        holder.screwView.setText(item.getEquipScrews());
        holder.supportView.setText(item.getEquipSupport());
        holder.materialView.setTextColor(ContextCompat.getColor(context, getMaterialTextColor(isSafeChecked)));
        holder.screwView.setTextColor(ContextCompat.getColor(context, getScrewTextColor(isSafeChecked)));
        if (checkStarred(starlistData, itemId)) {
            holder.starView.setText(context.getString(R.string.aa_btn_star1));
        } else {
            holder.starView.setText(context.getString(R.string.aa_btn_star0));
        }

        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(context, AkashiDetailActivity.class);
                intent.putExtra("item_id", itemId);
                intent.putExtra("item_info", itemImprovementData);
                context.startActivity(intent);
            }
        });

        holder.starView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String starred = getStringPreferences(context, PREF_AKASHI_STARLIST);
                TextView tv = (TextView) v;
                if (tv.getText().equals(context.getString(R.string.aa_btn_star0))) {
                    setPreferences(context, PREF_AKASHI_STARLIST,