371 lines
7.7 KiB
Smali
371 lines
7.7 KiB
Smali
.class public Lcom/moji/recyclerviewpager/ViewUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "ViewUtils.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 7
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/support/v7/widget/RecyclerView;)Landroid/view/View;
|
|
.locals 4
|
|
|
|
.line 13
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->K()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 16
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->i(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 17
|
|
invoke-static {p0, v2}, Lcom/moji/recyclerviewpager/ViewUtils;->a(Landroid/support/v7/widget/RecyclerView;Landroid/view/View;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Landroid/support/v7/widget/RecyclerView;I)Landroid/view/View;
|
|
.locals 4
|
|
|
|
.line 102
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->K()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 105
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->i(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 106
|
|
invoke-virtual {p0, v2}, Landroid/support/v7/widget/RecyclerView;->g(Landroid/view/View;)I
|
|
|
|
move-result v3
|
|
|
|
if-ne v3, p1, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Landroid/support/v7/widget/RecyclerView;Landroid/view/View;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 74
|
|
new-array v1, v0, [I
|
|
|
|
.line 75
|
|
new-array v2, v0, [I
|
|
|
|
.line 76
|
|
invoke-virtual {p0, v1}, Landroid/support/v7/widget/RecyclerView;->getLocationOnScreen([I)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 77
|
|
aget v1, v1, v3
|
|
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getWidth()I
|
|
|
|
move-result p0
|
|
|
|
div-int/2addr p0, v0
|
|
|
|
add-int/2addr v1, p0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 79
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->getLocationOnScreen([I)V
|
|
|
|
.line 80
|
|
aget p0, v2, v3
|
|
|
|
if-gt p0, v1, :cond_0
|
|
|
|
aget p0, v2, v3
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
|
|
|
|
move-result p1
|
|
|
|
add-int/2addr p0, p1
|
|
|
|
if-lt p0, v1, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
return v3
|
|
.end method
|
|
|
|
.method public static b(Landroid/support/v7/widget/RecyclerView;)I
|
|
.locals 4
|
|
|
|
.line 29
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->K()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 32
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->i(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 33
|
|
invoke-static {p0, v2}, Lcom/moji/recyclerviewpager/ViewUtils;->a(Landroid/support/v7/widget/RecyclerView;Landroid/view/View;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 34
|
|
invoke-virtual {p0, v2}, Landroid/support/v7/widget/RecyclerView;->f(Landroid/view/View;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|
|
|
|
.method public static b(Landroid/support/v7/widget/RecyclerView;Landroid/view/View;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x2
|
|
|
|
.line 88
|
|
new-array v1, v0, [I
|
|
|
|
.line 89
|
|
new-array v2, v0, [I
|
|
|
|
.line 90
|
|
invoke-virtual {p0, v1}, Landroid/support/v7/widget/RecyclerView;->getLocationOnScreen([I)V
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 91
|
|
aget v1, v1, v3
|
|
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getHeight()I
|
|
|
|
move-result p0
|
|
|
|
div-int/2addr p0, v0
|
|
|
|
add-int/2addr v1, p0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 93
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->getLocationOnScreen([I)V
|
|
|
|
.line 94
|
|
aget p0, v2, v3
|
|
|
|
if-gt p0, v1, :cond_0
|
|
|
|
aget p0, v2, v3
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getHeight()I
|
|
|
|
move-result p1
|
|
|
|
add-int/2addr p0, p1
|
|
|
|
if-lt p0, v1, :cond_0
|
|
|
|
return v3
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static c(Landroid/support/v7/widget/RecyclerView;)Landroid/view/View;
|
|
.locals 4
|
|
|
|
.line 45
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->K()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 48
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->i(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 49
|
|
invoke-static {p0, v2}, Lcom/moji/recyclerviewpager/ViewUtils;->b(Landroid/support/v7/widget/RecyclerView;Landroid/view/View;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static d(Landroid/support/v7/widget/RecyclerView;)I
|
|
.locals 4
|
|
|
|
.line 61
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->K()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 64
|
|
invoke-virtual {p0}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2, v1}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->i(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
.line 65
|
|
invoke-static {p0, v2}, Lcom/moji/recyclerviewpager/ViewUtils;->b(Landroid/support/v7/widget/RecyclerView;Landroid/view/View;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 66
|
|
invoke-virtual {p0, v2}, Landroid/support/v7/widget/RecyclerView;->f(Landroid/view/View;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v0
|
|
.end method
|