package 㳳.K.K;

import android.content.Context;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import org.angmarch.views.PopUpTextAlignment;
import org.angmarch.views.R$id;
import org.angmarch.views.R$layout;
import ῲ.ᨨ.ῲ.C1806;

/* renamed from: 㳳.K.K.㸾  reason: contains not printable characters */
/* compiled from: NiceSpinnerBaseAdapter */
public abstract class AbstractC2429<T> extends BaseAdapter {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final AbstractC2426 f8372;

    /* renamed from: ඓ  reason: contains not printable characters */
    public int f8373;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final PopUpTextAlignment f8374;

    /* renamed from: 㴹  reason: contains not printable characters */
    public int f8375;

    /* renamed from: 㸾  reason: contains not printable characters */
    public int f8376;

    /* renamed from: 㳳.K.K.㸾$K  reason: contains not printable characters */
    /* compiled from: NiceSpinnerBaseAdapter */
    public static class C2430 {

        /* renamed from: K  reason: contains not printable characters */
        public TextView f8377;

        public C2430(TextView textView) {
            this.f8377 = textView;
        }
    }

    public AbstractC2429(int i, int i2, AbstractC2426 r3, PopUpTextAlignment popUpTextAlignment) {
        this.f8372 = r3;
        this.f8373 = i2;
        this.f8376 = i;
        this.f8374 = popUpTextAlignment;
    }

    public abstract int getCount();

    public abstract T getItem(int i);

    public long getItemId(int i) {
        return (long) i;
    }

    public View getView(int i, View view, ViewGroup viewGroup) {
        TextView textView;
        Context context = viewGroup.getContext();
        if (view == null) {
            view = View.inflate(context, R$layout.spinner_list_item, null);
            textView = (TextView) view.findViewById(R$id.text_view_spinner);
            int i2 = Build.VERSION.SDK_INT;
            textView.setBackground(C1806.m4683(context, this.f8373));
            view.setTag(new C2430(textView));
        } else {
            textView = ((C2430) view.getTag()).f8377;
        }
        textView.setText(((C2428) this.f8372).m6484(getItem(i)));
        textView.setTextColor(this.f8376);
        int ordinal = this.f8374.ordinal();
        if (ordinal == 0) {
            textView.setGravity(8388611);
        } else if (ordinal == 1) {
            textView.setGravity(8388613);
        } else if (ordinal == 2) {
            textView.setGravity(1);
        }
        return view;
    }

    /* renamed from: K  reason: contains not printable characters */
    public abstract T m6485(int i);
}
