package com.tencent.mm.plugin.wenote.model.nativenote.manager;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.View.OnClickListener;
import android.widget.PopupWindow;
import com.tencent.matrix.trace.core.AppMethodBeat;

public final class g {
    public View mParentView;
    public PopupWindow uPB;
    public a uPC;

    public g(Context context, View view) {
        AppMethodBeat.i(26779);
        this.mParentView = view;
        View inflate = LayoutInflater.from(context).inflate(2130971231, null);
        inflate.measure(MeasureSpec.makeMeasureSpec(0, 0), MeasureSpec.makeMeasureSpec(0, 0));
        this.uPB = new PopupWindow(inflate, -2, -2, false);
        this.uPB.setClippingEnabled(false);
        inflate.findViewById(2131829220).setOnClickListener(new 1(this));
        inflate.findViewById(2131829221).setOnClickListener(new 2(this));
        inflate.findViewById(2131829222).setOnClickListener(new 3(this));
        inflate.findViewById(2131829223).setOnClickListener(new OnClickListener() {
            public final void onClick(View view) {
                AppMethodBeat.i(26778);
                g.this.uPB.dismiss();
                g.this.mParentView.setVisibility(8);
                if (g.this.uPC != null) {
                    g.this.uPC.deG();
                }
                AppMethodBeat.o(26778);
            }
        });
        AppMethodBeat.o(26779);
    }
}
