186 lines
3.9 KiB
Smali
186 lines
3.9 KiB
Smali
.class public Lcom/moji/novice/component/RedLeavesSubscribeComponent;
|
|
.super Ljava/lang/Object;
|
|
.source "RedLeavesSubscribeComponent.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/novice/guide/Component;
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/graphics/Rect;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/graphics/Rect;)V
|
|
.locals 0
|
|
|
|
.line 20
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 21
|
|
iput-object p1, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Landroid/view/LayoutInflater;)Landroid/view/View;
|
|
.locals 6
|
|
|
|
.line 26
|
|
sget v0, Lcom/moji/novice/R$layout;->layout_red_leaves_subscribe_module:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 27
|
|
iget-object v0, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
iget v0, v0, Landroid/graphics/Rect;->left:I
|
|
|
|
if-lez v0, :cond_2
|
|
|
|
.line 28
|
|
new-instance v0, Landroid/graphics/Paint;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
|
|
|
|
const/high16 v1, 0x41400000 # 12.0f
|
|
|
|
.line 29
|
|
invoke-static {v1}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v2
|
|
|
|
int-to-float v2, v2
|
|
|
|
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTextSize(F)V
|
|
|
|
const/high16 v2, 0x42040000 # 33.0f
|
|
|
|
.line 30
|
|
invoke-static {v2}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v2
|
|
|
|
int-to-float v2, v2
|
|
|
|
.line 31
|
|
invoke-static {v1}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
.line 32
|
|
sget v3, Lcom/moji/novice/R$string;->red_leaves_subscribe_tip:I
|
|
|
|
invoke-static {v3}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F
|
|
|
|
move-result v0
|
|
|
|
.line 33
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
sub-float/2addr v3, v0
|
|
|
|
const/high16 v4, 0x41500000 # 13.0f
|
|
|
|
.line 34
|
|
invoke-static {v4}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v4
|
|
|
|
int-to-float v4, v4
|
|
|
|
sub-float/2addr v3, v4
|
|
|
|
float-to-int v3, v3
|
|
|
|
.line 35
|
|
iget-object v4, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
iget v4, v4, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v4, v4
|
|
|
|
sub-float/2addr v4, v0
|
|
|
|
add-float/2addr v4, v2
|
|
|
|
int-to-float v5, v3
|
|
|
|
cmpl-float v4, v4, v5
|
|
|
|
if-lez v4, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v3, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
iget v3, v3, Landroid/graphics/Rect;->left:I
|
|
|
|
int-to-float v3, v3
|
|
|
|
sub-float/2addr v3, v0
|
|
|
|
add-float/2addr v3, v2
|
|
|
|
float-to-int v3, v3
|
|
|
|
.line 36
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
iget v0, v0, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float v0, v0
|
|
|
|
cmpl-float v0, v0, v1
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
iget v0, v0, Landroid/graphics/Rect;->bottom:I
|
|
|
|
int-to-float v0, v0
|
|
|
|
sub-float/2addr v0, v1
|
|
|
|
float-to-int v0, v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/novice/component/RedLeavesSubscribeComponent;->a:Landroid/graphics/Rect;
|
|
|
|
iget v0, v0, Landroid/graphics/Rect;->bottom:I
|
|
|
|
:goto_1
|
|
const/4 v1, 0x0
|
|
|
|
.line 37
|
|
invoke-virtual {p1, v3, v0, v1, v1}, Landroid/view/View;->setPadding(IIII)V
|
|
|
|
:cond_2
|
|
return-object p1
|
|
.end method
|