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

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.m;
import com.tencent.mm.bz.a;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.vending.app.c;
import com.tencent.mm.vending.c.b;
import com.tencent.mm.wallet_core.ui.WalletBaseUI;
import com.tencent.mm.wallet_core.ui.e;
import com.tenpay.android.wechat.MyKeyboardWindow;

public abstract class BaseAAPresenterActivity extends WalletBaseUI {
    private static final int gnS = a.fromDPToPix(ah.getContext(), 300);
    private c eMI = new c();
    protected View gnR;

    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        AppMethodBeat.at(this, z);
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.eMI.A(getIntent(), this);
        this.Ahz = true;
    }

    public void onResume() {
        super.onResume();
        this.eMI.a(2);
    }

    public void onPause() {
        super.onPause();
        this.eMI.a(3);
    }

    public void onDestroy() {
        super.onDestroy();
        this.eMI.onDestroy();
    }

    public final <T extends b<? extends com.tencent.mm.vending.app.a>> T V(Class<? extends b<? extends com.tencent.mm.vending.app.a>> cls) {
        return this.eMI.a(this, cls);
    }

    public final <T extends com.tencent.mm.vending.app.a> T Z(Class<? extends com.tencent.mm.vending.app.a> cls) {
        return this.eMI.b(this, cls);
    }

    public final boolean c(int i, int i2, String str, m mVar) {
        return false;
    }

    public final void a(View view, int i, boolean z, boolean z2) {
        this.mKeyboard = (MyKeyboardWindow) findViewById(2131822357);
        this.nTi = findViewById(2131822356);
        View findViewById = findViewById(2131822358);
        EditText editText = (EditText) view.findViewById(2131820687);
        if (this.mKeyboard != null && editText != null && this.nTi != null) {
            this.nTi.setVisibility(8);
            e.setNoSystemInputOnEditText(editText);
            editText.setOnFocusChangeListener(new 1(this, z, z2, editText, view, i));
            editText.setOnClickListener(new 2(this, z, editText, i));
            findViewById.setOnClickListener(new OnClickListener() {
                public final void onClick(View view) {
                    AppMethodBeat.i(40779);
                    BaseAAPresenterActivity.this.aoB();
                    AppMethodBeat.o(40779);
                }
            });
        }
    }

    public final void aoB() {
        super.aoB();
        if (this.gnR != null) {
            this.gnR.scrollTo(0, 0);
        }
    }
}
