995 lines
25 KiB
Smali
995 lines
25 KiB
Smali
.class public Lcom/moji/newliveview/camera/view/LableContainer;
|
|
.super Landroid/widget/RelativeLayout;
|
|
.source "LableContainer.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/content/Context;
|
|
|
|
.field private b:Landroid/view/ViewGroup;
|
|
|
|
.field private c:Landroid/widget/ImageView;
|
|
|
|
.field private d:Landroid/widget/TextView;
|
|
|
|
.field private e:I
|
|
|
|
.field private f:Ljava/util/HashSet;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashSet<",
|
|
"Lcom/moji/newliveview/camera/view/Lable;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private g:Z
|
|
|
|
.field private h:Landroid/widget/TextView;
|
|
|
|
.field private i:F
|
|
|
|
.field private j:F
|
|
|
|
.field private k:Z
|
|
|
|
.field private l:Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 39
|
|
invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 34
|
|
new-instance v0, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 35
|
|
iput-boolean v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->g:Z
|
|
|
|
.line 40
|
|
invoke-direct {p0, p1}, Lcom/moji/newliveview/camera/view/LableContainer;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
.line 44
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
.line 34
|
|
new-instance p2, Ljava/util/HashSet;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 35
|
|
iput-boolean p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->g:Z
|
|
|
|
.line 45
|
|
invoke-direct {p0, p1}, Lcom/moji/newliveview/camera/view/LableContainer;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
.line 49
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
.line 34
|
|
new-instance p2, Ljava/util/HashSet;
|
|
|
|
invoke-direct {p2}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 35
|
|
iput-boolean p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->g:Z
|
|
|
|
.line 50
|
|
invoke-direct {p0, p1}, Lcom/moji/newliveview/camera/view/LableContainer;->a(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/newliveview/camera/view/LableContainer;)Landroid/widget/TextView;
|
|
.locals 0
|
|
|
|
.line 28
|
|
iget-object p0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private a(Landroid/content/Context;)V
|
|
.locals 6
|
|
|
|
.line 54
|
|
iput-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->a:Landroid/content/Context;
|
|
|
|
.line 56
|
|
new-instance v0, Landroid/widget/RelativeLayout;
|
|
|
|
invoke-direct {v0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
.line 57
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
const v1, -0x33e5e5e6 # -4.0396904E7f
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setBackgroundColor(I)V
|
|
|
|
const/high16 v0, 0x42480000 # 50.0f
|
|
|
|
.line 58
|
|
invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->e:I
|
|
|
|
.line 59
|
|
new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->e:I
|
|
|
|
const/4 v2, -0x1
|
|
|
|
invoke-direct {v0, v2, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
|
|
|
|
.line 60
|
|
iget v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->e:I
|
|
|
|
neg-int v1, v1
|
|
|
|
iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I
|
|
|
|
.line 61
|
|
iget-object v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {p0, v1, v0}, Lcom/moji/newliveview/camera/view/LableContainer;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
.line 63
|
|
new-instance v0, Landroid/widget/ImageView;
|
|
|
|
invoke-direct {v0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->c:Landroid/widget/ImageView;
|
|
|
|
.line 64
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->c:Landroid/widget/ImageView;
|
|
|
|
sget v1, Lcom/moji/newliveview/R$drawable;->edit_lable_delete_normal:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
|
|
|
|
.line 65
|
|
new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;
|
|
|
|
const/4 v1, -0x2
|
|
|
|
invoke-direct {v0, v1, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
|
|
|
|
const/16 v3, 0xe
|
|
|
|
.line 66
|
|
invoke-virtual {v0, v3}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V
|
|
|
|
const/high16 v4, 0x41200000 # 10.0f
|
|
|
|
.line 67
|
|
invoke-static {v4}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v4
|
|
|
|
iput v4, v0, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I
|
|
|
|
.line 68
|
|
iget-object v4, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
iget-object v5, p0, Lcom/moji/newliveview/camera/view/LableContainer;->c:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {v4, v5, v0}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
.line 70
|
|
new-instance v0, Landroid/widget/TextView;
|
|
|
|
invoke-direct {v0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
.line 71
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/high16 v4, 0x41400000 # 12.0f
|
|
|
|
invoke-virtual {p1, v0, v4}, Landroid/widget/TextView;->setTextSize(IF)V
|
|
|
|
.line 72
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, v2}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
.line 73
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
sget v0, Lcom/moji/newliveview/R$string;->drag_here_to_delete:I
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
.line 74
|
|
new-instance p1, Landroid/widget/RelativeLayout$LayoutParams;
|
|
|
|
invoke-direct {p1, v1, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
|
|
|
|
.line 75
|
|
invoke-virtual {p1, v3}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V
|
|
|
|
const/high16 v0, 0x41c80000 # 25.0f
|
|
|
|
.line 76
|
|
invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p1, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I
|
|
|
|
.line 77
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
iget-object v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Lcom/moji/newliveview/camera/view/Lable;Landroid/view/MotionEvent;)V
|
|
.locals 4
|
|
|
|
.line 154
|
|
invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 155
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->l:Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 156
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->l:Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
|
|
invoke-interface {p1}, Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;->b()V
|
|
|
|
.line 158
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->c()V
|
|
|
|
goto/16 :goto_0
|
|
|
|
.line 159
|
|
:cond_1
|
|
invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-ne v0, v2, :cond_3
|
|
|
|
.line 160
|
|
iget-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p2}, Landroid/widget/TextView;->getX()F
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Lcom/moji/newliveview/camera/view/Lable;->getWidth()I
|
|
|
|
move-result v0
|
|
|
|
div-int/2addr v0, v2
|
|
|
|
int-to-float v0, v0
|
|
|
|
sub-float/2addr p2, v0
|
|
|
|
.line 161
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/TextView;->getX()F
|
|
|
|
move-result v0
|
|
|
|
iget-object v2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/TextView;->getWidth()I
|
|
|
|
move-result v2
|
|
|
|
int-to-float v2, v2
|
|
|
|
add-float/2addr v0, v2
|
|
|
|
const/high16 v2, 0x41c80000 # 25.0f
|
|
|
|
.line 162
|
|
invoke-static {v2}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v2
|
|
|
|
.line 163
|
|
iget v3, p1, Lcom/moji/newliveview/camera/view/Lable;->a:F
|
|
|
|
cmpg-float p2, p2, v3
|
|
|
|
if-gez p2, :cond_2
|
|
|
|
iget p2, p1, Lcom/moji/newliveview/camera/view/Lable;->a:F
|
|
|
|
cmpg-float p2, p2, v0
|
|
|
|
if-gez p2, :cond_2
|
|
|
|
iget p1, p1, Lcom/moji/newliveview/camera/view/Lable;->b:F
|
|
|
|
int-to-float p2, v2
|
|
|
|
cmpg-float p1, p1, p2
|
|
|
|
if-gez p1, :cond_2
|
|
|
|
.line 164
|
|
iput-boolean v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->k:Z
|
|
|
|
.line 165
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
const/high16 p2, -0x33010000 # -1.3369344E8f
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
.line 166
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
sget p2, Lcom/moji/newliveview/R$string;->loosen_will_delete:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
.line 167
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->c:Landroid/widget/ImageView;
|
|
|
|
sget p2, Lcom/moji/newliveview/R$drawable;->edit_lable_delete_pressed:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->setBackgroundResource(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 p1, 0x0
|
|
|
|
.line 169
|
|
iput-boolean p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->k:Z
|
|
|
|
.line 170
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
const/4 p2, -0x1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
.line 171
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->d:Landroid/widget/TextView;
|
|
|
|
sget p2, Lcom/moji/newliveview/R$string;->drag_here_to_delete:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
.line 172
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->c:Landroid/widget/ImageView;
|
|
|
|
sget p2, Lcom/moji/newliveview/R$drawable;->edit_lable_delete_normal:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->setBackgroundResource(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 174
|
|
:cond_3
|
|
invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result p2
|
|
|
|
if-ne p2, v1, :cond_5
|
|
|
|
.line 175
|
|
invoke-virtual {p1}, Lcom/moji/newliveview/camera/view/Lable;->performClick()Z
|
|
|
|
.line 176
|
|
iget-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->l:Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
.line 177
|
|
iget-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->l:Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
|
|
invoke-interface {p2}, Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;->c()V
|
|
|
|
.line 179
|
|
:cond_4
|
|
invoke-direct {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->d()V
|
|
|
|
.line 180
|
|
iget-boolean p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->k:Z
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
.line 181
|
|
iget-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {p2, p1}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
.line 182
|
|
invoke-virtual {p0, p1}, Lcom/moji/newliveview/camera/view/LableContainer;->removeView(Landroid/view/View;)V
|
|
|
|
:cond_5
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/newliveview/camera/view/LableContainer;Lcom/moji/newliveview/camera/view/Lable;Landroid/view/MotionEvent;)V
|
|
.locals 0
|
|
|
|
.line 28
|
|
invoke-direct {p0, p1, p2}, Lcom/moji/newliveview/camera/view/LableContainer;->a(Lcom/moji/newliveview/camera/view/Lable;Landroid/view/MotionEvent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private c()V
|
|
.locals 3
|
|
|
|
.line 188
|
|
new-instance v0, Landroid/view/animation/TranslateAnimation;
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->e:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v0, v2, v2, v2, v1}, Landroid/view/animation/TranslateAnimation;-><init>(FFFF)V
|
|
|
|
const-wide/16 v1, 0x2bc
|
|
|
|
.line 189
|
|
invoke-virtual {v0, v1, v2}, Landroid/view/animation/Animation;->setDuration(J)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 190
|
|
invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setFillAfter(Z)V
|
|
|
|
.line 191
|
|
iget-object v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {v1, v0}, Landroid/view/ViewGroup;->startAnimation(Landroid/view/animation/Animation;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private d()V
|
|
.locals 3
|
|
|
|
.line 195
|
|
new-instance v0, Landroid/view/animation/TranslateAnimation;
|
|
|
|
iget v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->e:I
|
|
|
|
int-to-float v1, v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v0, v2, v2, v1, v2}, Landroid/view/animation/TranslateAnimation;-><init>(FFFF)V
|
|
|
|
const-wide/16 v1, 0x190
|
|
|
|
.line 196
|
|
invoke-virtual {v0, v1, v2}, Landroid/view/animation/Animation;->setDuration(J)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 197
|
|
invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setFillAfter(Z)V
|
|
|
|
.line 198
|
|
iget-object v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->b:Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {v1, v0}, Landroid/view/ViewGroup;->startAnimation(Landroid/view/animation/Animation;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 109
|
|
iput-boolean v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->g:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/String;)V
|
|
.locals 7
|
|
|
|
.line 113
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 116
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 117
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/newliveview/camera/view/LableContainer;->removeView(Landroid/view/View;)V
|
|
|
|
.line 119
|
|
:cond_1
|
|
new-instance v0, Lcom/moji/newliveview/camera/view/Lable;
|
|
|
|
iget-object v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->a:Landroid/content/Context;
|
|
|
|
invoke-direct {v0, v1}, Lcom/moji/newliveview/camera/view/Lable;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 120
|
|
invoke-virtual {v0, p1}, Lcom/moji/newliveview/camera/view/Lable;->setText(Ljava/lang/String;)V
|
|
|
|
.line 121
|
|
new-instance v1, Lcom/moji/newliveview/camera/view/LableContainer$2;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/newliveview/camera/view/LableContainer$2;-><init>(Lcom/moji/newliveview/camera/view/LableContainer;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/newliveview/camera/view/Lable;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
|
|
|
|
.line 129
|
|
iget v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->i:F
|
|
|
|
const/high16 v2, 0x41400000 # 12.0f
|
|
|
|
invoke-static {v2}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
sub-float/2addr v1, v3
|
|
|
|
.line 130
|
|
iget v3, p0, Lcom/moji/newliveview/camera/view/LableContainer;->j:F
|
|
|
|
const/high16 v4, 0x41700000 # 15.0f
|
|
|
|
invoke-static {v4}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v4
|
|
|
|
int-to-float v4, v4
|
|
|
|
sub-float/2addr v3, v4
|
|
|
|
.line 131
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->getWidth()I
|
|
|
|
move-result v4
|
|
|
|
const/high16 v5, 0x42080000 # 34.0f
|
|
|
|
invoke-static {v5}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v6
|
|
|
|
sub-int/2addr v4, v6
|
|
|
|
invoke-static {v2}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result p1
|
|
|
|
mul-int v2, v2, p1
|
|
|
|
sub-int/2addr v4, v2
|
|
|
|
const/high16 p1, 0x41300000 # 11.0f
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result p1
|
|
|
|
mul-int/lit8 p1, p1, 0x2
|
|
|
|
sub-int/2addr v4, p1
|
|
|
|
int-to-float p1, v4
|
|
|
|
.line 132
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->getHeight()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v5}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v4
|
|
|
|
sub-int/2addr v2, v4
|
|
|
|
int-to-float v2, v2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
cmpg-float v5, v1, v4
|
|
|
|
if-gez v5, :cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
cmpl-float v5, v1, p1
|
|
|
|
if-lez v5, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
move p1, v1
|
|
|
|
.line 133
|
|
:goto_0
|
|
invoke-virtual {v0, p1}, Lcom/moji/newliveview/camera/view/Lable;->setX(F)V
|
|
|
|
cmpg-float p1, v3, v4
|
|
|
|
if-gez p1, :cond_4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
cmpl-float p1, v3, v2
|
|
|
|
if-lez p1, :cond_5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
move v2, v3
|
|
|
|
.line 134
|
|
:goto_1
|
|
invoke-virtual {v0, v2}, Lcom/moji/newliveview/camera/view/Lable;->setY(F)V
|
|
|
|
.line 135
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 136
|
|
invoke-virtual {p0, v0}, Lcom/moji/newliveview/camera/view/LableContainer;->addView(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()Ljava/util/ArrayList;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/moji/http/snsforum/entity/Label;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 214
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 215
|
|
iget-object v1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {v1}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/moji/newliveview/camera/view/Lable;
|
|
|
|
.line 216
|
|
new-instance v3, Lcom/moji/http/snsforum/entity/Label;
|
|
|
|
invoke-direct {v3}, Lcom/moji/http/snsforum/entity/Label;-><init>()V
|
|
|
|
.line 217
|
|
iget-object v4, v2, Lcom/moji/newliveview/camera/view/Lable;->c:Ljava/lang/String;
|
|
|
|
iput-object v4, v3, Lcom/moji/http/snsforum/entity/Label;->tag_name:Ljava/lang/String;
|
|
|
|
.line 218
|
|
iget v4, v2, Lcom/moji/newliveview/camera/view/Lable;->a:F
|
|
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->getWidth()I
|
|
|
|
move-result v5
|
|
|
|
int-to-float v5, v5
|
|
|
|
div-float/2addr v4, v5
|
|
|
|
iput v4, v3, Lcom/moji/http/snsforum/entity/Label;->tag_x:F
|
|
|
|
.line 219
|
|
iget v2, v2, Lcom/moji/newliveview/camera/view/Lable;->b:F
|
|
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->getHeight()I
|
|
|
|
move-result v4
|
|
|
|
int-to-float v4, v4
|
|
|
|
div-float/2addr v2, v4
|
|
|
|
iput v2, v3, Lcom/moji/http/snsforum/entity/Label;->tag_y:F
|
|
|
|
.line 220
|
|
invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public b(Ljava/lang/String;)Z
|
|
.locals 3
|
|
|
|
.line 202
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return v1
|
|
|
|
.line 205
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->f:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/moji/newliveview/camera/view/Lable;
|
|
|
|
.line 206
|
|
iget-object v2, v2, Lcom/moji/newliveview/camera/view/Lable;->c:Ljava/lang/String;
|
|
|
|
invoke-virtual {p1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method protected onSizeChanged(IIII)V
|
|
.locals 0
|
|
|
|
.line 82
|
|
invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/RelativeLayout;->onSizeChanged(IIII)V
|
|
|
|
.line 83
|
|
iget-boolean p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->g:Z
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 86
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 87
|
|
new-instance p1, Landroid/widget/TextView;
|
|
|
|
iget-object p2, p0, Lcom/moji/newliveview/camera/view/LableContainer;->a:Landroid/content/Context;
|
|
|
|
invoke-direct {p1, p2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
.line 88
|
|
new-instance p1, Lcom/moji/newliveview/camera/view/LableContainer$1;
|
|
|
|
invoke-direct {p1, p0}, Lcom/moji/newliveview/camera/view/LableContainer$1;-><init>(Lcom/moji/newliveview/camera/view/LableContainer;)V
|
|
|
|
const-wide/16 p2, 0x1f4
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/moji/newliveview/camera/view/LableContainer;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 103
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->getWidth()I
|
|
|
|
move-result p2
|
|
|
|
div-int/lit8 p2, p2, 0x2
|
|
|
|
const/high16 p3, 0x42400000 # 48.0f
|
|
|
|
invoke-static {p3}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
int-to-float p2, p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setX(F)V
|
|
|
|
.line 104
|
|
iget-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->h:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/newliveview/camera/view/LableContainer;->getHeight()I
|
|
|
|
move-result p2
|
|
|
|
div-int/lit8 p2, p2, 0x2
|
|
|
|
const/high16 p3, 0x41800000 # 16.0f
|
|
|
|
invoke-static {p3}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
int-to-float p2, p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setY(F)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 1
|
|
|
|
.line 143
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 145
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->i:F
|
|
|
|
.line 146
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/moji/newliveview/camera/view/LableContainer;->j:F
|
|
|
|
.line 148
|
|
:cond_0
|
|
invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public setOnLableTouchListener(Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;)V
|
|
.locals 0
|
|
|
|
.line 228
|
|
iput-object p1, p0, Lcom/moji/newliveview/camera/view/LableContainer;->l:Lcom/moji/newliveview/camera/view/LableContainer$OnLableTouchListener;
|
|
|
|
return-void
|
|
.end method
|