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

import android.content.Context;
import android.util.AttributeSet;
import android.view.View.OnClickListener;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.game.a.c;
import com.tencent.mm.sdk.platformtools.ab;

public class GameInfoViewForeign extends RelativeLayout {
    private int edE = 0;
    private Context mContext;
    private int mXC = 0;
    private TextView njq;
    private int njr = 2;
    private OnClickListener njs = new 1(this);

    public GameInfoViewForeign(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        AppMethodBeat.i(111993);
        this.mContext = context;
        AppMethodBeat.o(111993);
    }

    /* Access modifiers changed, original: protected */
    public void onFinishInflate() {
        AppMethodBeat.i(111994);
        super.onFinishInflate();
        setOnClickListener(this.njs);
        this.njq = (TextView) findViewById(2131824385);
        bFo();
        ab.i("MicroMsg.GameInfoViewForeign", "initView finished");
        AppMethodBeat.o(111994);
    }

    public final void bFo() {
        AppMethodBeat.i(111995);
        this.edE = ((c) g.K(c.class)).bCY().bEw();
        if (this.edE > 0 && this.edE <= 99) {
            this.njq.setVisibility(0);
            this.njq.setText(this.edE);
            AppMethodBeat.o(111995);
        } else if (this.edE > 99) {
            this.njq.setVisibility(0);
            this.njq.setText("99+");
            this.njq.setTextSize(1, 9.0f);
            AppMethodBeat.o(111995);
        } else {
            this.njq.setVisibility(4);
            AppMethodBeat.o(111995);
        }
    }

    public void setSourceScene(int i) {
        this.mXC = i;
    }
}
