// Path: AIMSICD/src/main/java/zz/aimsicd/lite/adapters/holders/ViewTableNameSpinnerHolder.java
// public class ViewTableNameSpinnerHolder {
// 
//     public TextView name;
// 
// }
// 
// Path: AIMSICD/src/main/java/zz/aimsicd/lite/enums/StatesDbViewer.java
// public enum StatesDbViewer {
// 
//     UNIQUE_BTS_DATA(R.string.unique_bts_data),
//     BTS_MEASUREMENTS(R.string.bts_measurements),
//     IMPORTED_OCID_DATA(R.string.imported_ocid_data),
//     DEFAULT_MCC_LOCATIONS(R.string.default_mmc_locations),
//     SILENT_SMS(R.string.silent_sms),
//     MEASURED_SIGNAL_STRENGTHS(R.string.measured_signal_strengths),
//     EVENT_LOG(R.string.eventlog),
//     DETECTION_STRINGS(R.string.detection_strings);
//     //TODO DetectionFlags
//     // DETECTION_FLAGS(R.string.detection_flags)
// 
//     private final int mStatementValue;
// 
//     StatesDbViewer(int pStatementValue) {
//         mStatementValue = pStatementValue;
//     }
// 
//     public int getStatementValue() {
//         return mStatementValue;
//     }
// 
// 
//     public static List<StatesDbViewer> getStates() {
//         return new ArrayList<>(Arrays.asList(values()));
//     }
// 
//     public static StatesDbViewer getValueByOrdinal(int pOrdinal) {
//         StatesDbViewer lResult = null;
//         for (StatesDbViewer item : values()) {
//             if (item.ordinal() == pOrdinal) {
//                 lResult = item;
//                 break;
//             }
//         }
//         return lResult;
//     }
// 
//     public String getDisplayName(Context pContext) {
//         if (pContext == null) {
//             return null;
//         }
//         return pContext.getString(getStatementValue());
//     }
// 
// }


import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.List;
import zz.aimsicd.lite.R;
import zz.aimsicd.lite.adapters.holders.ViewTableNameSpinnerHolder;
import zz.aimsicd.lite.enums.StatesDbViewer;
/* Android IMSI-Catcher Detector | (c) AIMSICD Privacy Project
 * -----------------------------------------------------------
 * LICENSE:  http://git.io/vki47 | TERMS:  http://git.io/vki4o
 * -----------------------------------------------------------
 */
package zz.aimsicd.lite.adapters;




public class DbViewerSpinnerAdapter extends ArrayAdapter<StatesDbViewer> {

    public DbViewerSpinnerAdapter(Context pContext, int pResource) {
        super(pContext, pResource);
        mDataList = StatesDbViewer.getStates();
    }

    List<StatesDbViewer> mDataList;


    @Override
    public View getView(int pPosition, View pConvertView, ViewGroup pParent) {

        View lView = pConvertView;
        ViewTableNameSpinnerHolder lHolder;
        if (lView == null
                || (lView.getId() != R.id.item_root_layout && !(lView.getTag() instanceof ViewTableNameSpinnerHolder))) {

            lView = ((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(
                    R.layout.item_spinner_db_viewer, pParent, false);
            lHolder = setViewHolderToView(lView);

        } else {
// Path: AIMSICD/src/main/java/zz/aimsicd/lite/adapters/holders/ViewTableNameSpinnerHolder.java
// public class ViewTableNameSpinnerHolder {
// 
//     public TextView name;
// 
// }
// 
// Path: AIMSICD/src/main/java/zz/aimsicd/lite/enums/StatesDbViewer.java
// public enum StatesDbViewer {
// 
//     UNIQUE_BTS_DATA(R.string.unique_bts_data),
//     BTS_MEASUREMENTS(R.string.bts_measurements),
//     IMPORTED_OCID_DATA(R.string.imported_ocid_data),
//     DEFAULT_MCC_LOCATIONS(R.string.default_mmc_locations),
//     SILENT_SMS(R.string.silent_sms),
//     MEASURED_SIGNAL_STRENGTHS(R.string.measured_signal_strengths),
//     EVENT_LOG(R.string.eventlog),
//     DETECTION_STRINGS(R.string.detection_strings);
//     //TODO DetectionFlags
//     // DETECTION_FLAGS(R.string.detection_flags)
// 
//     private final int mStatementValue;
// 
//     StatesDbViewer(int pStatementValue) {
//         mStatementValue = pStatementValue;
//     }
// 
//     public int getStatementValue() {
//         return mStatementValue;
//     }
// 
// 
//     public static List<StatesDbViewer> getStates() {
//         return new ArrayList<>(Arrays.asList(values()));
//     }
// 
//     public static StatesDbViewer getValueByOrdinal(int pOrdinal) {
//         StatesDbViewer lResult = null;
//         for (StatesDbViewer item : values()) {
//             if (item.ordinal() == pOrdinal) {
//                 lResult = item;
//                 break;
//             }
//         }
//         return lResult;
//     }
// 
//     public String getDisplayName(Context pContext) {
//         if (pContext == null) {
//             return null;
//         }
//         return pContext.getString(getStatementValue());
//     }
// 
// }


// Path: AIMSICD/src/main/java/zz/aimsicd/lite/adapters/DbViewerSpinnerAdapter.java
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.List;
import zz.aimsicd.lite.R;
import zz.aimsicd.lite.adapters.holders.ViewTableNameSpinnerHolder;
import zz.aimsicd.lite.enums.StatesDbViewer;

/* Android IMSI-Catcher Detector | (c) AIMSICD Privacy Project
 * -----------------------------------------------------------
 * LICENSE:  http://git.io/vki47 | TERMS:  http://git.io/vki4o
 * -----------------------------------------------------------
 */
package zz.aimsicd.lite.adapters;




public class DbViewerSpinnerAdapter extends ArrayAdapter<StatesDbViewer> {

    public DbViewerSpinnerAdapter(Context pContext, int pResource) {
        super(pContext, pResource);
        mDataList = StatesDbViewer.getStates();
    }

    List<StatesDbViewer> mDataList;


    @Override
    public View getView(int pPosition, View pConvertView, ViewGroup pParent) {

        View lView = pConvertView;
        ViewTableNameSpinnerHolder lHolder;
        if (lView == null
                || (lView.getId() != R.id.item_root_layout && !(lView.getTag() instanceof ViewTableNameSpinnerHolder))) {

            lView = ((LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(
                    R.layout.item_spinner_db_viewer, pParent, false);
            lHolder = setViewHolderToView(lView);

        } else {
            lHolder = (ViewTableNameSpinnerHolder) lView.getTag();