DesignUtil.smali
.class public Lcom/scwang/smartrefresh/layout/util/DesignUtil;
.super Ljava/lang/Object;
.source "DesignUtil.java"
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 1
.line 15
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static checkCoordinatorLayout(Landroid/view/View;Lcom/scwang/smartrefresh/layout/api/RefreshKernel;Lcom/scwang/smartrefresh/layout/listener/CoordinatorLayoutListener;)V
.registers 8
.param p0, "content" # Landroid/view/View;
.param p1, "kernel" # Lcom/scwang/smartrefresh/layout/api/RefreshKernel;
.param p2, "listener" # Lcom/scwang/smartrefresh/layout/listener/CoordinatorLayoutListener;
.line 19
:try_start_0
instance-of v0, p0, Landroidx/coordinatorlayout/widget/CoordinatorLayout;
if-eqz v0, :cond_2d
.line 20
invoke-interface {p1}, Lcom/scwang/smartrefresh/layout/api/RefreshKernel;->getRefreshLayout()Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
move-result-object v0
const/4 v1, 0x0
invoke-interface {v0, v1}, Lcom/scwang/smartrefresh/layout/api/RefreshLayout;->setEnableNestedScroll(Z)Lcom/scwang/smartrefresh/layout/api/RefreshLayout;
.line 21
move-object v0, p0
check-cast v0, Landroid/view/ViewGroup;
.line 22
.local v0, "layout":Landroid/view/ViewGroup;
invoke-virtual {v0}, Landroid/view/ViewGroup;->getChildCount()I
move-result v1
add-int/lit8 v1, v1, -0x1
.local v1, "i":I
:goto_15
if-ltz v1, :cond_2d
.line 23
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->getChildAt(I)Landroid/view/View;
move-result-object v2
.line 24
.local v2, "view":Landroid/view/View;
instance-of v3, v2, Lcom/google/android/material/appbar/AppBarLayout;
if-eqz v3, :cond_2a
.line 25
move-object v3, v2
check-cast v3, Lcom/google/android/material/appbar/AppBarLayout;
new-instance v4, Lcom/scwang/smartrefresh/layout/util/DesignUtil$1;
invoke-direct {v4, p2}, Lcom/scwang/smartrefresh/layout/util/DesignUtil$1;-><init>(Lcom/scwang/smartrefresh/layout/listener/CoordinatorLayoutListener;)V
invoke-virtual {v3, v4}, Lcom/google/android/material/appbar/AppBarLayout;->addOnOffsetChangedListener(Lcom/google/android/material/appbar/AppBarLayout$OnOffsetChangedListener;)V
:try_end_2a
.catchall {:try_start_0 .. :try_end_2a} :catchall_2e
.line 22
.end local v2 # "view":Landroid/view/View;
:cond_2a
add-int/lit8 v1, v1, -0x1
goto :goto_15
.line 38
.end local v0 # "layout":Landroid/view/ViewGroup;
.end local v1 # "i":I
:cond_2d
goto :goto_32
.line 36
:catchall_2e
move-exception v0
.line 37
.local v0, "e":Ljava/lang/Throwable;
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
.line 39
.end local v0 # "e":Ljava/lang/Throwable;
:goto_32
return-void
.end method