Weather/smali_classes2/com/moji/mjweather/weather/window/BigLabel.smali
2021-05-10 10:13:34 +02:00

568 lines
16 KiB
Smali

.class public Lcom/moji/mjweather/weather/window/BigLabel;
.super Ljava/lang/Object;
.source "BigLabel.java"
# interfaces
.implements Lcom/moji/mjweather/weather/window/ILabel;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
}
.end annotation
# instance fields
.field private a:Landroid/content/Context;
.field private b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
.field private c:Landroid/widget/TextView;
.field private d:Landroid/widget/ImageView;
.field private e:Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;
.field private f:Lcom/moji/http/show/IWindowData;
.field private g:Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;)V
.locals 1
const/4 v0, 0x0
.line 41
invoke-direct {p0, p1, p2, v0}, Lcom/moji/mjweather/weather/window/BigLabel;-><init>(Landroid/content/Context;Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;Lcom/moji/http/show/IWindowData;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;Lcom/moji/http/show/IWindowData;)V
.locals 0
.line 44
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 45
iput-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->a:Landroid/content/Context;
.line 46
iput-object p2, p0, Lcom/moji/mjweather/weather/window/BigLabel;->e:Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;
.line 47
iput-object p3, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
.line 48
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object p1
const p2, 0x7f0b022e
const/4 p3, 0x0
invoke-virtual {p1, p2, p3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object p1
check-cast p1, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
iput-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
.line 54
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
invoke-virtual {p1, p0}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->setTag(Ljava/lang/Object;)V
.line 55
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
const p2, 0x7f090478
invoke-virtual {p1, p2}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/TextView;
iput-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
.line 56
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
const p2, 0x7f090477
invoke-virtual {p1, p2}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/ImageView;
iput-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->d:Landroid/widget/ImageView;
.line 57
new-instance p1, Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
invoke-direct {p1, p0}, Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;-><init>(Lcom/moji/mjweather/weather/window/BigLabel;)V
iput-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->g:Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
return-void
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/window/BigLabel;)Landroid/widget/TextView;
.locals 0
.line 28
iget-object p0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
return-object p0
.end method
.method private a(Landroid/view/View$OnClickListener;)V
.locals 1
.line 170
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
invoke-virtual {v0, p1}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
if-nez p1, :cond_0
.line 172
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
const v0, 0x7f080139
invoke-virtual {p1, v0}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->setBackgroundResource(I)V
:cond_0
return-void
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/window/BigLabel;I)V
.locals 0
.line 28
invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/window/BigLabel;->b(I)V
return-void
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/window/BigLabel;Landroid/view/View$OnClickListener;)V
.locals 0
.line 28
invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/window/BigLabel;->a(Landroid/view/View$OnClickListener;)V
return-void
.end method
.method static synthetic a(Lcom/moji/mjweather/weather/window/BigLabel;Ljava/lang/String;)V
.locals 0
.line 28
invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/window/BigLabel;->b(Ljava/lang/String;)V
return-void
.end method
.method private b(I)V
.locals 2
.line 133
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
const/4 v1, 0x0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {v0}, Lcom/moji/http/show/IWindowData;->c()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 134
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->d:Landroid/widget/ImageView;
invoke-virtual {p1, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 135
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->a:Landroid/content/Context;
invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
move-result-object p1
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {v0}, Lcom/moji/http/show/IWindowData;->c()Ljava/lang/String;
move-result-object v0
invoke-virtual {p1, v0}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
move-result-object p1
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->d:Landroid/widget/ImageView;
invoke-virtual {p1, v0}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
goto :goto_0
:cond_0
if-nez p1, :cond_1
.line 138
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->d:Landroid/widget/ImageView;
const/16 v0, 0x8
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setVisibility(I)V
goto :goto_0
.line 140
:cond_1
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->d:Landroid/widget/ImageView;
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V
.line 141
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->a:Landroid/content/Context;
invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
move-result-object v0
invoke-virtual {v0, p1}, Lcom/squareup/picasso/Picasso;->a(I)Lcom/squareup/picasso/RequestCreator;
move-result-object p1
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->d:Landroid/widget/ImageView;
invoke-virtual {p1, v0}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V
:goto_0
return-void
.end method
.method static synthetic b(Lcom/moji/mjweather/weather/window/BigLabel;)V
.locals 0
.line 28
invoke-direct {p0}, Lcom/moji/mjweather/weather/window/BigLabel;->c()V
return-void
.end method
.method private b(Ljava/lang/String;)V
.locals 2
.line 110
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
const/4 v1, 0x0
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {v0}, Lcom/moji/http/show/IWindowData;->b()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_1
.line 111
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {p1}, Lcom/moji/http/show/IWindowData;->b()Ljava/lang/String;
move-result-object p1
const-string v0, "none"
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
.line 112
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
const/16 v0, 0x8
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setVisibility(I)V
goto :goto_0
.line 114
:cond_0
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 115
:goto_0
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {v0}, Lcom/moji/http/show/IWindowData;->b()Ljava/lang/String;
move-result-object v0
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
goto :goto_1
.line 117
:cond_1
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
.line 118
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->c:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
:goto_1
return-void
.end method
.method private c()V
.locals 3
.line 147
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {v0}, Lcom/moji/http/show/IWindowData;->d()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 148
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->a:Landroid/content/Context;
invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
move-result-object v0
iget-object v1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
invoke-interface {v1}, Lcom/moji/http/show/IWindowData;->d()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
move-result-object v0
iget-object v1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
invoke-virtual {v0, v1}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/Target;)V
goto :goto_0
.line 151
:cond_0
:try_start_0
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
new-instance v1, Lcom/moji/tool/drawable/MJStateDrawable;
const v2, 0x7f080139
invoke-direct {v1, v2}, Lcom/moji/tool/drawable/MJStateDrawable;-><init>(I)V
invoke-virtual {v0, v1}, Lcom/moji/mjweather/weather/view/PicassoLinearLayout;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
const-string v1, "BigLabel"
.line 153
invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_0
return-void
.end method
.method private d()Z
.locals 2
.line 177
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v0
invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;
move-result-object v1
if-ne v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
# virtual methods
.method public a()Landroid/view/View;
.locals 1
.line 91
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->b:Lcom/moji/mjweather/weather/view/PicassoLinearLayout;
return-object v0
.end method
.method public a(I)V
.locals 2
.line 123
invoke-direct {p0}, Lcom/moji/mjweather/weather/window/BigLabel;->d()Z
move-result v0
if-eqz v0, :cond_0
.line 124
invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/window/BigLabel;->b(I)V
goto :goto_0
.line 126
:cond_0
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->g:Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
const/16 v1, 0x63
invoke-virtual {v0, v1}, Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
.line 127
iput p1, v0, Landroid/os/Message;->arg1:I
.line 128
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:goto_0
return-void
.end method
.method public a(Lcom/moji/http/show/IWindowData;)V
.locals 1
.line 61
iput-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->f:Lcom/moji/http/show/IWindowData;
.line 62
invoke-direct {p0}, Lcom/moji/mjweather/weather/window/BigLabel;->d()Z
move-result p1
if-eqz p1, :cond_0
.line 63
invoke-direct {p0}, Lcom/moji/mjweather/weather/window/BigLabel;->c()V
goto :goto_0
.line 65
:cond_0
iget-object p1, p0, Lcom/moji/mjweather/weather/window/BigLabel;->g:Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
const/16 v0, 0x4d
invoke-virtual {p1, v0}, Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;->sendEmptyMessage(I)Z
:goto_0
return-void
.end method
.method public a(Ljava/lang/String;)V
.locals 2
.line 100
invoke-direct {p0}, Lcom/moji/mjweather/weather/window/BigLabel;->d()Z
move-result v0
if-eqz v0, :cond_0
.line 101
invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/window/BigLabel;->b(Ljava/lang/String;)V
goto :goto_0
.line 103
:cond_0
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->g:Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;
const/16 v1, 0x58
invoke-virtual {v0, v1}, Lcom/moji/mjweather/weather/window/BigLabel$ViewHandler;->obtainMessage(I)Landroid/os/Message;
move-result-object v0
.line 104
iput-object p1, v0, Landroid/os/Message;->obj:Ljava/lang/Object;
.line 105
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
:goto_0
return-void
.end method
.method public b()Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;
.locals 1
.line 96
iget-object v0, p0, Lcom/moji/mjweather/weather/window/BigLabel;->e:Lcom/moji/mjweather/weather/window/LabelWindow$LABEL_POSITION;
return-object v0
.end method