package com.tencent.mm.plugin.wallet.balance.ui;

import android.annotation.SuppressLint;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.wallet.balance.ui.WalletSelectBankcardModeUI.a;

@SuppressLint({"ViewHolder"})
class WalletSelectBankcardModeUI$b extends BaseAdapter {
    final /* synthetic */ WalletSelectBankcardModeUI thS;

    WalletSelectBankcardModeUI$b(WalletSelectBankcardModeUI walletSelectBankcardModeUI) {
        this.thS = walletSelectBankcardModeUI;
    }

    public final int getCount() {
        AppMethodBeat.i(45491);
        int size = WalletSelectBankcardModeUI.b(this.thS).size();
        AppMethodBeat.o(45491);
        return size;
    }

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

    public final View getView(int i, View view, ViewGroup viewGroup) {
        AppMethodBeat.i(45492);
        View inflate = View.inflate(this.thS, 2130971165, null);
        a aVar = (a) WalletSelectBankcardModeUI.b(this.thS).get(i);
        TextView textView = (TextView) inflate.findViewById(2131829053);
        ImageView imageView = (ImageView) inflate.findViewById(2131829054);
        ((TextView) inflate.findViewById(2131829052)).setText(aVar.title);
        if (TextUtils.isEmpty(aVar.kfM)) {
            textView.setVisibility(8);
        } else {
            textView.setVisibility(0);
            textView.setText(aVar.kfM);
        }
        if (WalletSelectBankcardModeUI.c(this.thS) == i) {
            imageView.setImageResource(2131231853);
        } else {
            imageView.setImageResource(2131231852);
        }
        AppMethodBeat.o(45492);
        return inflate;
    }

    public final /* synthetic */ Object getItem(int i) {
        AppMethodBeat.i(45493);
        a aVar = (a) WalletSelectBankcardModeUI.b(this.thS).get(i);
        AppMethodBeat.o(45493);
        return aVar;
    }
}
