2020-11-12 02:11:44 +00:00
.class public final L androidx/viewpager2/widget/ScrollEventAdapter ;
.super L androidx/recyclerview/widget/RecyclerView$OnScrollListener ;
.source "ScrollEventAdapter.java"
# annotations
.annotation system L dalvik/annotation/MemberClasses ;
value = {
L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
}
.end annotation
# static fields
2020-11-14 03:19:56 +00:00
.field private static final NO_POSITION : I = - 0x1
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private static final STATE_IDLE : I = 0x0
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private static final STATE_IN_PROGRESS_FAKE_DRAG : I = 0x4
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private static final STATE_IN_PROGRESS_IMMEDIATE_SCROLL : I = 0x3
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private static final STATE_IN_PROGRESS_MANUAL_DRAG : I = 0x1
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private static final STATE_IN_PROGRESS_SMOOTH_SCROLL : I = 0x2
2020-11-12 02:11:44 +00:00
# instance fields
2020-11-14 03:19:56 +00:00
.field private mAdapterState : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mCallback : L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mDataSetChangeHappened : Z
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mDispatchSelected : Z
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mDragStartPosition : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mFakeDragging : Z
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private final mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
2020-11-12 02:11:44 +00:00
.annotation build L androidx/annotation/NonNull ;
.end annotation
.end field
2020-11-14 03:19:56 +00:00
.field private final mRecyclerView : L androidx/recyclerview/widget/RecyclerView ;
2020-11-12 02:11:44 +00:00
.annotation build L androidx/annotation/NonNull ;
.end annotation
.end field
2020-11-14 03:19:56 +00:00
.field private mScrollHappened : Z
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mScrollState : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private mTarget : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
.field private final mViewPager : L androidx/viewpager2/widget/ViewPager2 ;
2020-11-12 02:11:44 +00:00
.annotation build L androidx/annotation/NonNull ;
.end annotation
.end field
# direct methods
.method public constructor <init> ( L androidx/viewpager2/widget/ViewPager2 ;) V
.locals 0
. param p1 # Landroidx/viewpager2/widget/ViewPager2;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
invoke-direct { p0 } , L androidx/recyclerview/widget/RecyclerView$OnScrollListener ;-> <init> ( ) V
iput-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mViewPager : L androidx/viewpager2/widget/ViewPager2 ;
iget-object p1 , p1 , L androidx/viewpager2/widget/ViewPager2 ;-> mRecyclerView : L androidx/recyclerview/widget/RecyclerView ;
iput-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mRecyclerView : L androidx/recyclerview/widget/RecyclerView ;
invoke-virtual { p1 } , L androidx/recyclerview/widget/RecyclerView ;-> getLayoutManager ( ) L androidx/recyclerview/widget/RecyclerView$LayoutManager ;
move-result-object p1
check-cast p1 , L androidx/recyclerview/widget/LinearLayoutManager ;
iput-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
new-instance p1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
invoke-direct { p1 } , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> <init> ( ) V
iput-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> resetState ( ) V
return-void
.end method
.method private dispatchScrolled ( IFI ) V
.locals 1
iget-object v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mCallback : L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;
if-eqz v0 , :cond_0
invoke-virtual { v0 , p1 , p2 , p3 } , L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;-> onPageScrolled ( IFI ) V
:cond_0
return-void
.end method
.method private dispatchSelected ( I ) V
.locals 1
iget-object v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mCallback : L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;
if-eqz v0 , :cond_0
invoke-virtual { v0 , p1 } , L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;-> onPageSelected ( I ) V
:cond_0
return-void
.end method
.method private dispatchStateChanged ( I ) V
.locals 2
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
const/4 v1 , 0x3
if-ne v0 , v1 , :cond_0
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
if-nez v0 , :cond_0
return-void
:cond_0
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
if-ne v0 , p1 , :cond_1
return-void
:cond_1
iput p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
iget-object v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mCallback : L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;
if-eqz v0 , :cond_2
invoke-virtual { v0 , p1 } , L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;-> onPageScrollStateChanged ( I ) V
:cond_2
return-void
.end method
.method private getPosition ( ) I
.locals 1
iget-object v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v0 } , L androidx/recyclerview/widget/LinearLayoutManager ;-> findFirstVisibleItemPosition ( ) I
move-result v0
return v0
.end method
.method private isInAnyDraggingState ( ) Z
.locals 3
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
const/4 v1 , 0x1
if-eq v0 , v1 , :cond_1
const/4 v2 , 0x4
if-ne v0 , v2 , :cond_0
goto :goto_0
:cond_0
const/4 v1 , 0x0
:cond_1
:goto_0
return v1
.end method
.method private resetState ( ) V
.locals 2
const/4 v0 , 0x0
iput v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
iput v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
iget-object v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
invoke-virtual { v1 } , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> reset ( ) V
const/4 v1 , - 0x1
iput v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
iput v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
iput-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDispatchSelected : Z
iput-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollHappened : Z
iput-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mFakeDragging : Z
iput-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDataSetChangeHappened : Z
return-void
.end method
.method private startDrag ( Z ) V
.locals 2
iput-boolean p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mFakeDragging : Z
const/4 v0 , 0x1
if-eqz p1 , :cond_0
const/4 p1 , 0x4
goto :goto_0
:cond_0
const/4 p1 , 0x1
:goto_0
iput p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
iget p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
const/4 v1 , - 0x1
if-eq p1 , v1 , :cond_1
iput p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
iput v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
goto :goto_1
:cond_1
iget p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
if-ne p1 , v1 , :cond_2
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> getPosition ( ) I
move-result p1
iput p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
:cond_2
:goto_1
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
return-void
.end method
.method private updateScrollEventValues ( ) V
.locals 9
iget-object v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget-object v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v1 } , L androidx/recyclerview/widget/LinearLayoutManager ;-> findFirstVisibleItemPosition ( ) I
move-result v1
iput v1 , v0 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
const/4 v2 , - 0x1
if-ne v1 , v2 , :cond_0
invoke-virtual { v0 } , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> reset ( ) V
return-void
:cond_0
iget-object v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v2 , v1 } , L androidx/recyclerview/widget/LinearLayoutManager ;-> findViewByPosition ( I ) L android/view/View ;
move-result-object v1
if-nez v1 , :cond_1
invoke-virtual { v0 } , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> reset ( ) V
return-void
:cond_1
iget-object v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v2 , v1 } , L androidx/recyclerview/widget/RecyclerView$LayoutManager ;-> getLeftDecorationWidth ( L android/view/View ;) I
move-result v2
iget-object v3 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v3 , v1 } , L androidx/recyclerview/widget/RecyclerView$LayoutManager ;-> getRightDecorationWidth ( L android/view/View ;) I
move-result v3
iget-object v4 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v4 , v1 } , L androidx/recyclerview/widget/RecyclerView$LayoutManager ;-> getTopDecorationHeight ( L android/view/View ;) I
move-result v4
iget-object v5 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v5 , v1 } , L androidx/recyclerview/widget/RecyclerView$LayoutManager ;-> getBottomDecorationHeight ( L android/view/View ;) I
move-result v5
invoke-virtual { v1 } , L android/view/View ;-> getLayoutParams ( ) L android/view/ViewGroup$LayoutParams ;
move-result-object v6
instance-of v7 , v6 , L android/view/ViewGroup$MarginLayoutParams ;
if-eqz v7 , :cond_2
check-cast v6 , L android/view/ViewGroup$MarginLayoutParams ;
iget v7 , v6 , L android/view/ViewGroup$MarginLayoutParams ;-> leftMargin : I
add-int/2addr v2 , v7
iget v7 , v6 , L android/view/ViewGroup$MarginLayoutParams ;-> rightMargin : I
add-int/2addr v3 , v7
iget v7 , v6 , L android/view/ViewGroup$MarginLayoutParams ;-> topMargin : I
add-int/2addr v4 , v7
iget v6 , v6 , L android/view/ViewGroup$MarginLayoutParams ;-> bottomMargin : I
add-int/2addr v5 , v6
:cond_2
invoke-virtual { v1 } , L android/view/View ;-> getHeight ( ) I
move-result v6
add-int/2addr v6 , v4
add-int/2addr v6 , v5
invoke-virtual { v1 } , L android/view/View ;-> getWidth ( ) I
move-result v5
add-int/2addr v5 , v2
add-int/2addr v5 , v3
iget-object v3 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-virtual { v3 } , L androidx/recyclerview/widget/LinearLayoutManager ;-> getOrientation ( ) I
move-result v3
const/4 v7 , 0x1
const/4 v8 , 0x0
if-nez v3 , :cond_3
const/4 v3 , 0x1
goto :goto_0
:cond_3
const/4 v3 , 0x0
:goto_0
if-eqz v3 , :cond_5
invoke-virtual { v1 } , L android/view/View ;-> getLeft ( ) I
move-result v1
sub-int/2addr v1 , v2
iget-object v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mRecyclerView : L androidx/recyclerview/widget/RecyclerView ;
invoke-virtual { v2 } , L android/view/ViewGroup ;-> getPaddingLeft ( ) I
move-result v2
sub-int/2addr v1 , v2
iget-object v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mViewPager : L androidx/viewpager2/widget/ViewPager2 ;
invoke-virtual { v2 } , L androidx/viewpager2/widget/ViewPager2 ;-> isRtl ( ) Z
move-result v2
if-eqz v2 , :cond_4
neg-int v1 , v1
:cond_4
move v6 , v5
goto :goto_1
:cond_5
invoke-virtual { v1 } , L android/view/View ;-> getTop ( ) I
move-result v1
sub-int/2addr v1 , v4
iget-object v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mRecyclerView : L androidx/recyclerview/widget/RecyclerView ;
invoke-virtual { v2 } , L android/view/ViewGroup ;-> getPaddingTop ( ) I
move-result v2
sub-int/2addr v1 , v2
:goto_1
neg-int v1 , v1
iput v1 , v0 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
if-gez v1 , :cond_7
new-instance v1 , L androidx/viewpager2/widget/AnimateLayoutChangeDetector ;
iget-object v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mLayoutManager : L androidx/recyclerview/widget/LinearLayoutManager ;
invoke-direct { v1 , v2 } , L androidx/viewpager2/widget/AnimateLayoutChangeDetector ;-> <init> ( L androidx/recyclerview/widget/LinearLayoutManager ;) V
invoke-virtual { v1 } , L androidx/viewpager2/widget/AnimateLayoutChangeDetector ;-> mayHaveInterferingAnimations ( ) Z
move-result v1
if-eqz v1 , :cond_6
new-instance v0 , L java/lang/IllegalStateException ;
const-string v1 , "Page(s) contain a ViewGroup with a LayoutTransition (or animateLayoutChanges=\"true\"), which interferes with the scrolling animation. Make sure to call getLayoutTransition().setAnimateParentHierarchy(false) on all ViewGroups with a LayoutTransition before an animation is started."
invoke-direct { v0 , v1 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw v0
:cond_6
new-instance v1 , L java/lang/IllegalStateException ;
sget-object v2 , L java/util/Locale ;-> US : L java/util/Locale ;
new-array v3 , v7 , [ L java/lang/Object ;
iget v0 , v0 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
invoke-static { v0 } , L java/lang/Integer ;-> valueOf ( I ) L java/lang/Integer ;
move-result-object v0
aput-object v0 , v3 , v8
const-string v0 , "Page can only be offset by a positive amount, not by %d"
invoke-static { v2 , v0 , v3 } , L java/lang/String ;-> format ( L java/util/Locale ;L java/lang/String ;[ L java/lang/Object ;) L java/lang/String ;
move-result-object v0
invoke-direct { v1 , v0 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw v1
:cond_7
if-nez v6 , :cond_8
const/4 v1 , 0x0
goto :goto_2
:cond_8
int-to-float v1 , v1
int-to-float v2 , v6
div-float/2addr v1 , v2
:goto_2
iput v1 , v0 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffset : F
return-void
.end method
# virtual methods
.method public getRelativeScrollPosition ( ) D
.locals 5
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> updateScrollEventValues ( ) V
iget-object v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget v1 , v0 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
int-to-double v1 , v1
iget v0 , v0 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffset : F
float-to-double v3 , v0
add-double/2addr v1 , v3
return-wide v1
.end method
.method public getScrollState ( ) I
.locals 1
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
return v0
.end method
.method public isDragging ( ) Z
.locals 2
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
const/4 v1 , 0x1
if-ne v0 , v1 , :cond_0
goto :goto_0
:cond_0
const/4 v1 , 0x0
:goto_0
return v1
.end method
.method public isFakeDragging ( ) Z
.locals 1
iget-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mFakeDragging : Z
return v0
.end method
.method public isIdle ( ) Z
.locals 1
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
if-nez v0 , :cond_0
const/4 v0 , 0x1
goto :goto_0
:cond_0
const/4 v0 , 0x0
:goto_0
return v0
.end method
.method public notifyBeginFakeDrag ( ) V
.locals 1
const/4 v0 , 0x4
iput v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
const/4 v0 , 0x1
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> startDrag ( Z ) V
return-void
.end method
.method public notifyDataSetChangeHappened ( ) V
.locals 1
const/4 v0 , 0x1
iput-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDataSetChangeHappened : Z
return-void
.end method
.method public notifyEndFakeDrag ( ) V
.locals 3
invoke-virtual { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> isDragging ( ) Z
move-result v0
if-eqz v0 , :cond_0
iget-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mFakeDragging : Z
if-nez v0 , :cond_0
return-void
:cond_0
const/4 v0 , 0x0
iput-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mFakeDragging : Z
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> updateScrollEventValues ( ) V
iget-object v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget v2 , v1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
if-nez v2 , :cond_2
iget v1 , v1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
iget v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
if-eq v1 , v2 , :cond_1
invoke-direct { p0 , v1 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchSelected ( I ) V
:cond_1
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> resetState ( ) V
goto :goto_0
:cond_2
const/4 v0 , 0x2
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
:goto_0
return-void
.end method
.method public notifyProgrammaticScroll ( IZ ) V
.locals 2
const/4 v0 , 0x2
if-eqz p2 , :cond_0
const/4 p2 , 0x2
goto :goto_0
:cond_0
const/4 p2 , 0x3
:goto_0
iput p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
const/4 p2 , 0x0
iput-boolean p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mFakeDragging : Z
iget v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
if-eq v1 , p1 , :cond_1
const/4 p2 , 0x1
:cond_1
iput p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
if-eqz p2 , :cond_2
invoke-direct { p0 , p1 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchSelected ( I ) V
:cond_2
return-void
.end method
.method public onScrollStateChanged ( L androidx/recyclerview/widget/RecyclerView ;I ) V
.locals 5
. param p1 # Landroidx/recyclerview/widget/RecyclerView;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
iget p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
const/4 v0 , 0x0
const/4 v1 , 0x1
if-ne p1 , v1 , :cond_0
iget p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
if-eq p1 , v1 , :cond_1
:cond_0
if-ne p2 , v1 , :cond_1
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> startDrag ( Z ) V
return-void
:cond_1
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> isInAnyDraggingState ( ) Z
move-result p1
const/4 v2 , 0x2
if-eqz p1 , :cond_3
if-ne p2 , v2 , :cond_3
iget-boolean p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollHappened : Z
if-eqz p1 , :cond_2
invoke-direct { p0 , v2 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
iput-boolean v1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDispatchSelected : Z
:cond_2
return-void
:cond_3
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> isInAnyDraggingState ( ) Z
move-result p1
const/4 v3 , - 0x1
if-eqz p1 , :cond_7
if-nez p2 , :cond_7
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> updateScrollEventValues ( ) V
iget-boolean p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollHappened : Z
if-nez p1 , :cond_4
iget-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget p1 , p1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
if-eq p1 , v3 , :cond_6
const/4 v4 , 0x0
invoke-direct { p0 , p1 , v4 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchScrolled ( IFI ) V
goto :goto_0
:cond_4
iget-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget v4 , p1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
if-nez v4 , :cond_5
iget v4 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
iget p1 , p1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
if-eq v4 , p1 , :cond_6
invoke-direct { p0 , p1 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchSelected ( I ) V
goto :goto_0
:cond_5
const/4 v1 , 0x0
:cond_6
:goto_0
if-eqz v1 , :cond_7
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> resetState ( ) V
:cond_7
iget p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
if-ne p1 , v2 , :cond_a
if-nez p2 , :cond_a
iget-boolean p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDataSetChangeHappened : Z
if-eqz p1 , :cond_a
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> updateScrollEventValues ( ) V
iget-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget p2 , p1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
if-nez p2 , :cond_a
iget p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
iget p1 , p1 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
if-eq p2 , p1 , :cond_9
if-ne p1 , v3 , :cond_8
const/4 p1 , 0x0
:cond_8
invoke-direct { p0 , p1 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchSelected ( I ) V
:cond_9
invoke-direct { p0 , v0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> resetState ( ) V
:cond_a
return-void
.end method
.method public onScrolled ( L androidx/recyclerview/widget/RecyclerView ;II ) V
.locals 3
. param p1 # Landroidx/recyclerview/widget/RecyclerView;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
const/4 p1 , 0x1
iput-boolean p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollHappened : Z
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> updateScrollEventValues ( ) V
iget-boolean v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDispatchSelected : Z
const/4 v1 , - 0x1
const/4 v2 , 0x0
if-eqz v0 , :cond_4
iput-boolean v2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDispatchSelected : Z
if-gtz p3 , :cond_2
if-nez p3 , :cond_1
if-gez p2 , :cond_0
const/4 p2 , 0x1
goto :goto_0
:cond_0
const/4 p2 , 0x0
:goto_0
iget-object p3 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mViewPager : L androidx/viewpager2/widget/ViewPager2 ;
invoke-virtual { p3 } , L androidx/viewpager2/widget/ViewPager2 ;-> isRtl ( ) Z
move-result p3
if-ne p2 , p3 , :cond_1
goto :goto_1
:cond_1
const/4 p2 , 0x0
goto :goto_2
:cond_2
:goto_1
const/4 p2 , 0x1
:goto_2
if-eqz p2 , :cond_3
iget-object p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget p3 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
if-eqz p3 , :cond_3
iget p2 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
add-int/2addr p2 , p1
goto :goto_3
:cond_3
iget-object p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget p2 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
:goto_3
iput p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
iget p3 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mDragStartPosition : I
if-eq p3 , p2 , :cond_6
invoke-direct { p0 , p2 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchSelected ( I ) V
goto :goto_4
:cond_4
iget p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mAdapterState : I
if-nez p2 , :cond_6
iget-object p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
iget p2 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
if-ne p2 , v1 , :cond_5
const/4 p2 , 0x0
:cond_5
invoke-direct { p0 , p2 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchSelected ( I ) V
:cond_6
:goto_4
iget-object p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
2020-11-14 03:19:56 +00:00
iget p3 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-ne p3 , v1 , :cond_7
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
const/4 p3 , 0x0
2020-11-12 02:11:44 +00:00
:cond_7
2020-11-14 03:19:56 +00:00
iget v0 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffset : F
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget p2 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
invoke-direct { p0 , p3 , v0 , p2 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchScrolled ( IFI ) V
2020-11-12 02:11:44 +00:00
iget-object p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollValues : L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;
2020-11-14 03:19:56 +00:00
iget p3 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mPosition : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
iget v0 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mTarget : I
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-eq p3 , v0 , :cond_8
2020-11-12 02:11:44 +00:00
2020-11-14 03:19:56 +00:00
if-ne v0 , v1 , :cond_9
2020-11-12 02:11:44 +00:00
:cond_8
iget p2 , p2 , L androidx/viewpager2/widget/ScrollEventAdapter$ScrollEventValues ;-> mOffsetPx : I
if-nez p2 , :cond_9
iget p2 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mScrollState : I
if-eq p2 , p1 , :cond_9
invoke-direct { p0 , v2 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> dispatchStateChanged ( I ) V
invoke-direct { p0 } , L androidx/viewpager2/widget/ScrollEventAdapter ;-> resetState ( ) V
:cond_9
return-void
.end method
.method public setOnPageChangeCallback ( L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;) V
.locals 0
iput-object p1 , p0 , L androidx/viewpager2/widget/ScrollEventAdapter ;-> mCallback : L androidx/viewpager2/widget/ViewPager2$OnPageChangeCallback ;
return-void
.end method