626 lines
16 KiB
Smali
626 lines
16 KiB
Smali
.class public Lcom/google/android/material/appbar/AppBarLayout$ScrollingViewBehavior;
|
|
.super Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;
|
|
.source "AppBarLayout.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/google/android/material/appbar/AppBarLayout;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "ScrollingViewBehavior"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
|
|
.line 2
|
|
invoke-direct {p0, p1, p2}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
.line 3
|
|
sget-object v0, Lcom/google/android/material/R$styleable;->ScrollingViewBehavior_Layout:[I
|
|
|
|
.line 4
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
.line 5
|
|
sget p2, Lcom/google/android/material/R$styleable;->ScrollingViewBehavior_Layout_behavior_overlapTop:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 6
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
|
|
|
|
move-result p2
|
|
|
|
.line 7
|
|
invoke-virtual {p0, p2}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;->setOverlayTop(I)V
|
|
|
|
.line 8
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static getAppBarLayoutOffset(Lcom/google/android/material/appbar/AppBarLayout;)I
|
|
.locals 1
|
|
.param p0 # Lcom/google/android/material/appbar/AppBarLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Landroidx/coordinatorlayout/widget/CoordinatorLayout$d;
|
|
|
|
invoke-virtual {p0}, Landroidx/coordinatorlayout/widget/CoordinatorLayout$d;->f()Landroidx/coordinatorlayout/widget/CoordinatorLayout$Behavior;
|
|
|
|
move-result-object p0
|
|
|
|
.line 2
|
|
instance-of v0, p0, Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 3
|
|
check-cast p0, Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;
|
|
|
|
invoke-virtual {p0}, Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;->getTopBottomOffsetForScrollingSibling()I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private offsetChildAsNeeded(Landroid/view/View;Landroid/view/View;)V
|
|
.locals 3
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-virtual {p2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/coordinatorlayout/widget/CoordinatorLayout$d;
|
|
|
|
invoke-virtual {v0}, Landroidx/coordinatorlayout/widget/CoordinatorLayout$d;->f()Landroidx/coordinatorlayout/widget/CoordinatorLayout$Behavior;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
instance-of v1, v0, Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 3
|
|
check-cast v0, Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;
|
|
|
|
.line 4
|
|
invoke-virtual {p2}, Landroid/view/View;->getBottom()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getTop()I
|
|
|
|
move-result v2
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
.line 5
|
|
invoke-static {v0}, Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;->access$000(Lcom/google/android/material/appbar/AppBarLayout$BaseBehavior;)I
|
|
|
|
move-result v0
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;->getVerticalLayoutGap()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
.line 7
|
|
invoke-virtual {p0, p2}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;->getOverlapPixelsForOffset(Landroid/view/View;)I
|
|
|
|
move-result p2
|
|
|
|
sub-int/2addr v0, p2
|
|
|
|
.line 8
|
|
invoke-static {p1, v0}, Landroidx/core/view/ViewCompat;->f1(Landroid/view/View;I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private updateLiftedStateIfNeeded(Landroid/view/View;Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
instance-of v0, p2, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
check-cast p2, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
.line 3
|
|
invoke-virtual {p2}, Lcom/google/android/material/appbar/AppBarLayout;->isLiftOnScroll()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 4
|
|
invoke-virtual {p2, p1}, Lcom/google/android/material/appbar/AppBarLayout;->shouldLift(Landroid/view/View;)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2, p1}, Lcom/google/android/material/appbar/AppBarLayout;->setLiftedState(Z)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic findFirstDependency(Ljava/util/List;)Landroid/view/View;
|
|
.locals 0
|
|
.param p1 # Ljava/util/List;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Lcom/google/android/material/appbar/AppBarLayout$ScrollingViewBehavior;->findFirstDependency(Ljava/util/List;)Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public findFirstDependency(Ljava/util/List;)Lcom/google/android/material/appbar/AppBarLayout;
|
|
.locals 4
|
|
.param p1 # Ljava/util/List;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Landroid/view/View;",
|
|
">;)",
|
|
"Lcom/google/android/material/appbar/AppBarLayout;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 3
|
|
invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/view/View;
|
|
|
|
.line 4
|
|
instance-of v3, v2, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 5
|
|
check-cast v2, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public bridge synthetic getLeftAndRightOffset()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-super {p0}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->getLeftAndRightOffset()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getOverlapRatioForOffset(Landroid/view/View;)F
|
|
.locals 4
|
|
|
|
.line 1
|
|
instance-of v0, p1, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 2
|
|
check-cast p1, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
.line 3
|
|
invoke-virtual {p1}, Lcom/google/android/material/appbar/AppBarLayout;->getTotalScrollRange()I
|
|
|
|
move-result v0
|
|
|
|
.line 4
|
|
invoke-virtual {p1}, Lcom/google/android/material/appbar/AppBarLayout;->getDownNestedPreScrollRange()I
|
|
|
|
move-result v2
|
|
|
|
.line 5
|
|
invoke-static {p1}, Lcom/google/android/material/appbar/AppBarLayout$ScrollingViewBehavior;->getAppBarLayoutOffset(Lcom/google/android/material/appbar/AppBarLayout;)I
|
|
|
|
move-result p1
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
add-int v3, v0, p1
|
|
|
|
if-gt v3, v2, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
sub-int/2addr v0, v2
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/high16 v1, 0x3f800000 # 1.0f
|
|
|
|
int-to-float p1, p1
|
|
|
|
int-to-float v0, v0
|
|
|
|
div-float/2addr p1, v0
|
|
|
|
add-float/2addr p1, v1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public getScrollRange(Landroid/view/View;)I
|
|
.locals 1
|
|
|
|
.line 1
|
|
instance-of v0, p1, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
check-cast p1, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
invoke-virtual {p1}, Lcom/google/android/material/appbar/AppBarLayout;->getTotalScrollRange()I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-super {p0, p1}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;->getScrollRange(Landroid/view/View;)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic getTopAndBottomOffset()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-super {p0}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->getTopAndBottomOffset()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public bridge synthetic isHorizontalOffsetEnabled()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-super {p0}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->isHorizontalOffsetEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public bridge synthetic isVerticalOffsetEnabled()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-super {p0}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->isVerticalOffsetEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public layoutDependsOn(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/view/View;)Z
|
|
.locals 0
|
|
|
|
.line 1
|
|
instance-of p1, p3, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onDependentViewChanged(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/view/View;)Z
|
|
.locals 0
|
|
.param p1 # Landroidx/coordinatorlayout/widget/CoordinatorLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-direct {p0, p2, p3}, Lcom/google/android/material/appbar/AppBarLayout$ScrollingViewBehavior;->offsetChildAsNeeded(Landroid/view/View;Landroid/view/View;)V
|
|
|
|
.line 2
|
|
invoke-direct {p0, p2, p3}, Lcom/google/android/material/appbar/AppBarLayout$ScrollingViewBehavior;->updateLiftedStateIfNeeded(Landroid/view/View;Landroid/view/View;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onDependentViewRemoved(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/view/View;)V
|
|
.locals 0
|
|
.param p1 # Landroidx/coordinatorlayout/widget/CoordinatorLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
instance-of p2, p3, Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 2
|
|
sget-object p2, Lt1/c$a;->r:Lt1/c$a;
|
|
|
|
invoke-virtual {p2}, Lt1/c$a;->b()I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p1, p2}, Landroidx/core/view/ViewCompat;->r1(Landroid/view/View;I)V
|
|
|
|
.line 3
|
|
sget-object p2, Lt1/c$a;->s:Lt1/c$a;
|
|
|
|
invoke-virtual {p2}, Lt1/c$a;->b()I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p1, p2}, Landroidx/core/view/ViewCompat;->r1(Landroid/view/View;I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onLayoutChild(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;I)Z
|
|
.locals 0
|
|
.param p1 # Landroidx/coordinatorlayout/widget/CoordinatorLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-super {p0, p1, p2, p3}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->onLayoutChild(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic onMeasureChild(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;IIII)Z
|
|
.locals 0
|
|
.param p1 # Landroidx/coordinatorlayout/widget/CoordinatorLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-super/range {p0 .. p6}, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;->onMeasureChild(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;IIII)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onRequestChildRectangleOnScreen(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/graphics/Rect;Z)Z
|
|
.locals 3
|
|
.param p1 # Landroidx/coordinatorlayout/widget/CoordinatorLayout;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Landroid/graphics/Rect;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-virtual {p1, p2}, Landroidx/coordinatorlayout/widget/CoordinatorLayout;->getDependencies(Landroid/view/View;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Lcom/google/android/material/appbar/AppBarLayout$ScrollingViewBehavior;->findFirstDependency(Ljava/util/List;)Lcom/google/android/material/appbar/AppBarLayout;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p2}, Landroid/view/View;->getLeft()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getTop()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p3, v2, p2}, Landroid/graphics/Rect;->offset(II)V
|
|
|
|
.line 3
|
|
iget-object p2, p0, Lcom/google/android/material/appbar/HeaderScrollingViewBehavior;->tempRect1:Landroid/graphics/Rect;
|
|
|
|
.line 4
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getWidth()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getHeight()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2, v1, v1, v2, p1}, Landroid/graphics/Rect;->set(IIII)V
|
|
|
|
.line 5
|
|
invoke-virtual {p2, p3}, Landroid/graphics/Rect;->contains(Landroid/graphics/Rect;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
xor-int/lit8 p2, p4, 0x1
|
|
|
|
.line 6
|
|
invoke-virtual {v0, v1, p2}, Lcom/google/android/material/appbar/AppBarLayout;->setExpanded(ZZ)V
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public bridge synthetic setHorizontalOffsetEnabled(Z)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->setHorizontalOffsetEnabled(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic setLeftAndRightOffset(I)Z
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->setLeftAndRightOffset(I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic setTopAndBottomOffset(I)Z
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->setTopAndBottomOffset(I)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public bridge synthetic setVerticalOffsetEnabled(Z)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Lcom/google/android/material/appbar/ViewOffsetBehavior;->setVerticalOffsetEnabled(Z)V
|
|
|
|
return-void
|
|
.end method
|