package com.tencent.mm.plugin.product.ui;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.RadioButton;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.product.ui.d.b;
import java.util.List;

class d$a extends BaseAdapter {
    List<String> aEB;
    private final Context context;
    int piC = -1;
    private final int style;

    public d$a(Context context) {
        this.context = context;
        this.style = 1;
    }

    public final int getCount() {
        AppMethodBeat.i(44050);
        if (this.aEB != null) {
            int size = this.aEB.size();
            AppMethodBeat.o(44050);
            return size;
        }
        AppMethodBeat.o(44050);
        return 0;
    }

    public final Object getItem(int i) {
        return null;
    }

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

    public final View getView(int i, View view, ViewGroup viewGroup) {
        boolean z = true;
        AppMethodBeat.i(44051);
        if (view == null) {
            view = View.inflate(this.context, 2130970175, null);
            b bVar = new b();
            bVar.piD = (TextView) view.findViewById(2131820674);
            bVar.piE = (CheckBox) view.findViewById(2131826057);
            bVar.piF = (RadioButton) view.findViewById(2131820934);
            view.setTag(bVar);
        }
        b bVar2 = (b) view.getTag();
        bVar2.piD.setText((CharSequence) this.aEB.get(i));
        switch (this.style) {
            case 1:
                bVar2.piE.setVisibility(8);
                bVar2.piF.setVisibility(0);
                bVar2.piF.setChecked(i == this.piC);
                break;
            case 2:
                bVar2.piE.setVisibility(0);
                bVar2.piF.setVisibility(8);
                CheckBox checkBox = bVar2.piE;
                if (i != this.piC) {
                    z = false;
                }
                checkBox.setChecked(z);
                break;
            default:
                bVar2.piE.setVisibility(8);
                bVar2.piF.setVisibility(8);
                break;
        }
        AppMethodBeat.o(44051);
        return view;
    }
}
