185 lines
5.3 KiB
Smali
185 lines
5.3 KiB
Smali
.class public Lcom/moji/sakura/feedback/SakuraFeedBackView;
|
|
.super Landroid/widget/LinearLayout;
|
|
.source "SakuraFeedBackView.java"
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/widget/FrameLayout;
|
|
|
|
.field private b:Landroid/widget/TextView;
|
|
|
|
.field private c:Landroid/content/Context;
|
|
|
|
.field private d:Landroid/view/View$OnClickListener;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 27
|
|
invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 31
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/moji/sakura/feedback/SakuraFeedBackView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 35
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
.line 36
|
|
iput-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->c:Landroid/content/Context;
|
|
|
|
.line 37
|
|
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object p1
|
|
|
|
sget p2, Lcom/moji/sakura/R$layout;->sakura_feedback:I
|
|
|
|
const/4 p3, 0x1
|
|
|
|
invoke-virtual {p1, p2, p0, p3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a()V
|
|
.locals 2
|
|
|
|
.line 54
|
|
sget v0, Lcom/moji/sakura/R$id;->fl_sakura_feedback:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/sakura/feedback/SakuraFeedBackView;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/FrameLayout;
|
|
|
|
iput-object v0, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->a:Landroid/widget/FrameLayout;
|
|
|
|
.line 55
|
|
sget v0, Lcom/moji/sakura/R$id;->red_sakura_feedback_text:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/sakura/feedback/SakuraFeedBackView;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
iput-object v0, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->b:Landroid/widget/TextView;
|
|
|
|
.line 56
|
|
iget-object v0, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->a:Landroid/widget/FrameLayout;
|
|
|
|
iget-object v1, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->d:Landroid/view/View$OnClickListener;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.line 57
|
|
iget-object v0, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->c:Landroid/content/Context;
|
|
|
|
sget v1, Lcom/moji/sakura/R$string;->sakura_feedback:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lcom/moji/sakura/feedback/SakuraFeedBackView;->setFeedbackColor(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setFeedbackColor(Ljava/lang/String;)V
|
|
.locals 4
|
|
|
|
.line 47
|
|
new-instance v0, Landroid/text/SpannableString;
|
|
|
|
invoke-direct {v0, p1}, Landroid/text/SpannableString;-><init>(Ljava/lang/CharSequence;)V
|
|
|
|
.line 48
|
|
new-instance p1, Landroid/text/style/ForegroundColorSpan;
|
|
|
|
sget v1, Lcom/moji/sakura/R$color;->distance_color:I
|
|
|
|
invoke-static {v1}, Lcom/moji/tool/DeviceTool;->e(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {p1, v1}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x4
|
|
|
|
const/16 v3, 0x12
|
|
|
|
.line 49
|
|
invoke-virtual {v0, p1, v1, v2, v3}, Landroid/text/SpannableString;->setSpan(Ljava/lang/Object;III)V
|
|
|
|
.line 50
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->b:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected onFinishInflate()V
|
|
.locals 0
|
|
|
|
.line 42
|
|
invoke-super {p0}, Landroid/widget/LinearLayout;->onFinishInflate()V
|
|
|
|
.line 43
|
|
invoke-direct {p0}, Lcom/moji/sakura/feedback/SakuraFeedBackView;->a()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
.locals 1
|
|
|
|
.line 62
|
|
iput-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->d:Landroid/view/View$OnClickListener;
|
|
|
|
.line 63
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->a:Landroid/widget/FrameLayout;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 64
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->a:Landroid/widget/FrameLayout;
|
|
|
|
iget-object v0, p0, Lcom/moji/sakura/feedback/SakuraFeedBackView;->d:Landroid/view/View$OnClickListener;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|