.class public Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;
.super Ljava/lang/Object;
.source "MenuPopWindow.java"

# interfaces
.implements Landroid/widget/PopupWindow$OnDismissListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$OnMenuItemClickListener;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Landroid/widget/PopupWindow$OnDismissListener;"
    }
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/widget/PopupWindow;

.field private c:Landroid/view/View;

.field private d:Landroid/widget/LinearLayout;

.field private e:Landroid/view/View;

.field private f:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TT;"
        }
    .end annotation
.end field

.field private g:I

.field private h:Landroid/view/View$OnClickListener;

.field private i:Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$OnMenuItemClickListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    .line 28
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 26
    sget v0, Lcom/moji/mjweather/ipc/R$drawable;->d_transparent:I

    iput v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->g:I

    .line 92
    new-instance v0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$1;

    invoke-direct {v0, p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$1;-><init>(Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;)V

    iput-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->h:Landroid/view/View$OnClickListener;

    .line 29
    iput-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a:Landroid/content/Context;

    .line 30
    new-instance p1, Landroid/widget/PopupWindow;

    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a:Landroid/content/Context;

    invoke-direct {p1, v0}, Landroid/widget/PopupWindow;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    .line 31
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    const/4 v0, -0x2

    invoke-virtual {p1, v0}, Landroid/widget/PopupWindow;->setWidth(I)V

    .line 32
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    invoke-virtual {p1, v0}, Landroid/widget/PopupWindow;->setHeight(I)V

    .line 33
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Landroid/widget/PopupWindow;->setFocusable(Z)V

    .line 34
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    new-instance v0, Landroid/graphics/drawable/ColorDrawable;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {p1, v0}, Landroid/widget/PopupWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 35
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    invoke-virtual {p1, v1}, Landroid/widget/PopupWindow;->setFocusable(Z)V

    .line 36
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    invoke-virtual {p1, v1}, Landroid/widget/PopupWindow;->setOutsideTouchable(Z)V

    .line 37
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    sget v0, Lcom/moji/mjweather/ipc/R$style;->MenuPopupAnimation:I

    invoke-virtual {p1, v0}, Landroid/widget/PopupWindow;->setAnimationStyle(I)V

    .line 38
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    invoke-virtual {p1, p0}, Landroid/widget/PopupWindow;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;)Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$OnMenuItemClickListener;
    .locals 0

    .line 18
    iget-object p0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->i:Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$OnMenuItemClickListener;

    return-object p0
.end method

.method private a(Landroid/view/View;)V
    .locals 5

    const/4 v0, 0x2

    .line 105
    new-array v1, v0, [I

    .line 106
    invoke-virtual {p1, v1}, Landroid/view/View;->getLocationOnScreen([I)V

    .line 107
    iget-object v2, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    const/4 v3, -0x2

    invoke-virtual {v2, v3, v3}, Landroid/view/View;->measure(II)V

    .line 108
    iget-object v2, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getMeasuredWidth()I

    move-result v2

    .line 109
    iget-object v3, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    invoke-virtual {v3}, Landroid/view/View;->getMeasuredHeight()I

    move-result v3

    .line 110
    invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I

    move-result v4

    sub-int/2addr v4, v2

    .line 111
    div-int/2addr v4, v0

    const/4 v0, 0x1

    .line 112
    aget v0, v1, v0

    sub-int/2addr v0, v3

    add-int/lit8 v0, v0, -0xa

    .line 113
    iget-object v1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    const/16 v2, 0x33

    invoke-virtual {v1, p1, v2, v4, v0}, Landroid/widget/PopupWindow;->showAtLocation(Landroid/view/View;III)V

    .line 114
    iput-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->e:Landroid/view/View;

    .line 115
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->e:Landroid/view/View;

    sget v0, Lcom/moji/mjweather/ipc/R$drawable;->d_eeeeee:I

    invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundResource(I)V

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 1

    const/4 v0, 0x0

    .line 71
    invoke-direct {p0, p1, v0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a(Ljava/lang/String;Z)V

    return-void
.end method

.method private a(Ljava/lang/String;Z)V
    .locals 4

    .line 75
    new-instance v0, Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    const/16 v1, 0x10

    const/16 v2, 0x22

    .line 76
    invoke-virtual {v0, v2, v1, v2, v1}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 77
    sget v1, Lcom/moji/mjweather/ipc/R$color;->white:I

    invoke-static {v1}, Lcom/moji/tool/DeviceTool;->e(I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    const/4 v1, 0x1

    const/high16 v2, 0x41600000    # 14.0f

    .line 78
    invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextSize(IF)V

    const/16 v2, 0x11

    .line 79
    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setGravity(I)V

    .line 80
    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 81
    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 82
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->h:Landroid/view/View$OnClickListener;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 83
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->d:Landroid/widget/LinearLayout;

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v3, -0x2

    invoke-direct {v2, v3, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p1, v0, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    if-eqz p2, :cond_0

    .line 85
    new-instance p1, Landroid/view/View;

    iget-object p2, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a:Landroid/content/Context;

    invoke-direct {p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    .line 86
    new-instance p2, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v0, -0x1

    invoke-direct {p2, v1, v0}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p1, p2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 87
    sget p2, Lcom/moji/mjweather/ipc/R$color;->white:I

    invoke-virtual {p1, p2}, Landroid/view/View;->setBackgroundResource(I)V

    .line 88
    iget-object p2, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->d:Landroid/widget/LinearLayout;

    invoke-virtual {p2, p1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_0
    return-void
.end method

.method private a([Ljava/lang/String;)V
    .locals 5

    .line 65
    array-length v0, p1

    const/4 v1, 0x0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v0, :cond_1

    .line 66
    aget-object v3, p1, v2

    add-int/lit8 v4, v0, -0x1

    if-ge v2, v4, :cond_0

    const/4 v4, 0x1

    goto :goto_1

    :cond_0
    const/4 v4, 0x0

    :goto_1
    invoke-direct {p0, v3, v4}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a(Ljava/lang/String;Z)V

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    return-void
.end method

.method static synthetic b(Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;)Landroid/widget/PopupWindow;
    .locals 0

    .line 18
    iget-object p0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    return-object p0
.end method

.method static synthetic c(Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;)Ljava/lang/Object;
    .locals 0

    .line 18
    iget-object p0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->f:Ljava/lang/Object;

    return-object p0
.end method

.method private c()V
    .locals 3

    .line 56
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    if-nez v0, :cond_0

    .line 57
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a:Landroid/content/Context;

    sget v1, Lcom/moji/mjweather/ipc/R$layout;->view_menupop:I

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    .line 58
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    sget v1, Lcom/moji/mjweather/ipc/R$id;->ll_content:I

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->d:Landroid/widget/LinearLayout;

    .line 59
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    iget-object v1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/widget/PopupWindow;->setContentView(Landroid/view/View;)V

    .line 61
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->d:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->removeAllViews()V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 0

    .line 136
    iput p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->g:I

    return-void
.end method

.method public a(Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/view/View;",
            "Ljava/lang/String;",
            "TT;)V"
        }
    .end annotation

    .line 49
    iput-object p3, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->f:Ljava/lang/Object;

    .line 50
    invoke-direct {p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c()V

    .line 51
    invoke-direct {p0, p2}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a(Ljava/lang/String;)V

    .line 52
    invoke-direct {p0, p1}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a(Landroid/view/View;)V

    return-void
.end method

.method public a(Landroid/view/View;[Ljava/lang/String;Ljava/lang/Object;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/view/View;",
            "[",
            "Ljava/lang/String;",
            "TT;)V"
        }
    .end annotation

    .line 42
    iput-object p3, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->f:Ljava/lang/Object;

    .line 43
    invoke-direct {p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->c()V

    .line 44
    invoke-direct {p0, p2}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a([Ljava/lang/String;)V

    .line 45
    invoke-direct {p0, p1}, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->a(Landroid/view/View;)V

    return-void
.end method

.method public a(Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$OnMenuItemClickListener;)V
    .locals 0

    .line 146
    iput-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->i:Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow$OnMenuItemClickListener;

    return-void
.end method

.method public a()Z
    .locals 1

    .line 119
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v0

    return v0
.end method

.method public b()V
    .locals 1

    .line 124
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->b:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    return-void
.end method

.method public onDismiss()V
    .locals 2

    .line 129
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->e:Landroid/view/View;

    if-eqz v0, :cond_0

    .line 130
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->e:Landroid/view/View;

    iget v1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->g:I

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    const/4 v0, 0x0

    .line 131
    iput-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/MenuPopWindow;->e:Landroid/view/View;

    :cond_0
    return-void
.end method
