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

import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.wallet_core.utils.e;
import com.tencent.mm.protocal.protobuf.cgv;
import com.tencent.mm.protocal.protobuf.pc;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.vending.c.a;
import java.util.Iterator;

class WalletBalanceFetchUI$13 implements a<Object, com.tencent.mm.ai.a.a<pc>> {
    final /* synthetic */ WalletBalanceFetchUI the;

    WalletBalanceFetchUI$13(WalletBalanceFetchUI walletBalanceFetchUI) {
        this.the = walletBalanceFetchUI;
    }

    public final /* synthetic */ Object call(Object obj) {
        int i = 0;
        AppMethodBeat.i(45368);
        com.tencent.mm.ai.a.a aVar = (com.tencent.mm.ai.a.a) obj;
        ab.i("MicroMsg.WalletBalanceFetchUI", "errType: %s, errCode: %s, errMsg: %s", new Object[]{Integer.valueOf(aVar.errType), Integer.valueOf(aVar.errCode), aVar.aIm});
        WalletBalanceFetchUI.t(this.the);
        if (aVar.errType == 0 && aVar.errCode == 0) {
            WalletBalanceFetchUI.u(this.the).removeAllViews();
            LayoutParams layoutParams = new LayoutParams(-2, -2);
            if (!(((pc) aVar.fsy).vWo == null || ((pc) aVar.fsy).vWo.isEmpty())) {
                Iterator it = ((pc) aVar.fsy).vWo.iterator();
                while (it.hasNext()) {
                    cgv cgv = (cgv) it.next();
                    TextView textView = new TextView(this.the.mController.ylL);
                    e.a(textView, cgv, null);
                    if (i != 0) {
                        layoutParams.topMargin = com.tencent.mm.bz.a.al(this.the.mController.ylL, 2131427500);
                    }
                    WalletBalanceFetchUI.u(this.the).addView(textView, layoutParams);
                    i++;
                }
            }
        }
        AppMethodBeat.o(45368);
        return null;
    }
}
