226 lines
4.2 KiB
Smali
226 lines
4.2 KiB
Smali
.class public Lcom/moji/mjweather/weather/window/WindowView;
|
|
.super Landroid/widget/RelativeLayout;
|
|
.source "WindowView.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 18
|
|
invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
.line 22
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
.line 26
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/view/MotionEvent;)Z
|
|
.locals 6
|
|
|
|
.line 43
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/weather/window/WindowView;->getChildCount()I
|
|
|
|
move-result v0
|
|
|
|
.line 44
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F
|
|
|
|
move-result v1
|
|
|
|
.line 45
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F
|
|
|
|
move-result p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v0, :cond_2
|
|
|
|
.line 48
|
|
invoke-virtual {p0, v3}, Lcom/moji/mjweather/weather/window/WindowView;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v4
|
|
|
|
.line 50
|
|
invoke-virtual {v4}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_1
|
|
|
|
.line 51
|
|
instance-of v5, v4, Lcom/moji/mjweather/weather/window/DressWindow;
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
instance-of v5, v4, Lcom/moji/mjweather/weather/window/LabelWindow;
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
instance-of v5, v4, Landroid/widget/RelativeLayout;
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
.line 55
|
|
:cond_0
|
|
check-cast v4, Landroid/view/ViewGroup;
|
|
|
|
invoke-direct {p0, v4, v1, p1}, Lcom/moji/mjweather/weather/window/WindowView;->a(Landroid/view/ViewGroup;FF)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
return v4
|
|
|
|
:cond_1
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v2
|
|
.end method
|
|
|
|
.method private a(Landroid/view/ViewGroup;FF)Z
|
|
.locals 8
|
|
|
|
.line 68
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getChildCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_1
|
|
|
|
.line 70
|
|
invoke-virtual {p1, v2}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v3
|
|
|
|
.line 71
|
|
invoke-virtual {v3}, Landroid/view/View;->getVisibility()I
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
.line 72
|
|
new-array v4, v4, [I
|
|
|
|
.line 73
|
|
invoke-virtual {v3, v4}, Landroid/view/View;->getLocationOnScreen([I)V
|
|
|
|
.line 74
|
|
aget v5, v4, v1
|
|
|
|
const/4 v6, 0x1
|
|
|
|
.line 75
|
|
aget v4, v4, v6
|
|
|
|
.line 76
|
|
invoke-virtual {v3}, Landroid/view/View;->getWidth()I
|
|
|
|
move-result v7
|
|
|
|
add-int/2addr v7, v5
|
|
|
|
.line 77
|
|
invoke-virtual {v3}, Landroid/view/View;->getHeight()I
|
|
|
|
move-result v3
|
|
|
|
add-int/2addr v3, v4
|
|
|
|
int-to-float v4, v4
|
|
|
|
cmpl-float v4, p3, v4
|
|
|
|
if-ltz v4, :cond_0
|
|
|
|
int-to-float v3, v3
|
|
|
|
cmpg-float v3, p3, v3
|
|
|
|
if-gtz v3, :cond_0
|
|
|
|
int-to-float v3, v5
|
|
|
|
cmpl-float v3, p2, v3
|
|
|
|
if-ltz v3, :cond_0
|
|
|
|
int-to-float v3, v7
|
|
|
|
cmpg-float v3, p2, v3
|
|
|
|
if-gtz v3, :cond_0
|
|
|
|
return v6
|
|
|
|
:cond_0
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 1
|
|
|
|
.line 33
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/weather/window/WindowView;->a(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 36
|
|
invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/16 p1, 0x8
|
|
|
|
.line 38
|
|
invoke-virtual {p0, p1}, Lcom/moji/mjweather/weather/window/WindowView;->setVisibility(I)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|