package com.tencent.mm.plugin.appbrand.jsapi.n;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.ArrayList;

final class b$a extends BaseAdapter {
    private final ArrayList<String> hUW;
    private final int hUX;

    public b$a(ArrayList<String> arrayList, int i) {
        this.hUW = arrayList;
        this.hUX = i;
    }

    public final int getCount() {
        AppMethodBeat.i(74784);
        int size = this.hUW.size();
        AppMethodBeat.o(74784);
        return size;
    }

    private String getItem(int i) {
        AppMethodBeat.i(74785);
        String str = (String) this.hUW.get(i);
        AppMethodBeat.o(74785);
        return str;
    }

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

    public final View getView(int i, View view, ViewGroup viewGroup) {
        a aVar;
        AppMethodBeat.i(74786);
        if (view == null) {
            view = View.inflate(viewGroup.getContext(), 2130968733, null);
            a aVar2 = new a((byte) 0);
            aVar2.gsf = (TextView) view.findViewById(2131820678);
            view.setTag(aVar2);
            aVar = aVar2;
        } else {
            aVar = (a) view.getTag();
        }
        aVar.gsf.setText(getItem(i));
        aVar.gsf.setTextColor(this.hUX);
        AppMethodBeat.o(74786);
        return view;
    }
}
