apkfuckery/com.discord/smali/androidx/viewpager2/widget/ViewPager2.smali
2020-01-07 03:40:43 +01:00

1997 lines
67 KiB
Smali

.class public final Landroidx/viewpager2/widget/ViewPager2;
.super Landroid/view/ViewGroup;
.source "ViewPager2.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/viewpager2/widget/ViewPager2$DataSetChangeObserver;,
Landroidx/viewpager2/widget/ViewPager2$PageAwareAccessibilityProvider;,
Landroidx/viewpager2/widget/ViewPager2$BasicAccessibilityProvider;,
Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;,
Landroidx/viewpager2/widget/ViewPager2$PageTransformer;,
Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;,
Landroidx/viewpager2/widget/ViewPager2$SmoothScrollToPosition;,
Landroidx/viewpager2/widget/ViewPager2$PagerSnapHelperImpl;,
Landroidx/viewpager2/widget/ViewPager2$LinearLayoutManagerImpl;,
Landroidx/viewpager2/widget/ViewPager2$RecyclerViewImpl;,
Landroidx/viewpager2/widget/ViewPager2$SavedState;,
Landroidx/viewpager2/widget/ViewPager2$OffscreenPageLimit;,
Landroidx/viewpager2/widget/ViewPager2$ScrollState;,
Landroidx/viewpager2/widget/ViewPager2$Orientation;
}
.end annotation
# static fields
.field public static final OFFSCREEN_PAGE_LIMIT_DEFAULT:I = -0x1
.field public static final ORIENTATION_HORIZONTAL:I = 0x0
.field public static final ORIENTATION_VERTICAL:I = 0x1
.field public static final SCROLL_STATE_DRAGGING:I = 0x1
.field public static final SCROLL_STATE_IDLE:I = 0x0
.field public static final SCROLL_STATE_SETTLING:I = 0x2
.field public static sFeatureEnhancedA11yEnabled:Z = true
# instance fields
.field public mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
.field public mCurrentItem:I
.field public mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
.field public mCurrentItemDirty:Z
.field public mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
.field public mFakeDragger:Landroidx/viewpager2/widget/FakeDrag;
.field public mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
.field public mOffscreenPageLimit:I
.field public mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
.field public mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
.field public mPagerSnapHelper:Landroidx/recyclerview/widget/PagerSnapHelper;
.field public mPendingAdapterState:Landroid/os/Parcelable;
.field public mPendingCurrentItem:I
.field public mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
.field public mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
.field public mSavedItemAnimatorPresent:Z
.field public mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
.field public final mTmpChildRect:Landroid/graphics/Rect;
.field public final mTmpContainerRect:Landroid/graphics/Rect;
.field public mUserInputEnabled:Z
# direct methods
.method public static constructor <clinit>()V
.locals 0
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 3
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0, p1}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;)V
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpChildRect:Landroid/graphics/Rect;
new-instance v0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 v1, 0x3
invoke-direct {v0, v1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;-><init>(I)V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDirty:Z
new-instance v1, Landroidx/viewpager2/widget/ViewPager2$1;
invoke-direct {v1, p0}, Landroidx/viewpager2/widget/ViewPager2$1;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iput-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
const/4 v1, -0x1
iput v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v2, 0x0
iput-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
const/4 v0, 0x1
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mUserInputEnabled:Z
iput v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mOffscreenPageLimit:I
invoke-direct {p0, p1, v2}, Landroidx/viewpager2/widget/ViewPager2;->initialize(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 3
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-direct {p0, p1, p2}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpChildRect:Landroid/graphics/Rect;
new-instance v0, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 v1, 0x3
invoke-direct {v0, v1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;-><init>(I)V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDirty:Z
new-instance v1, Landroidx/viewpager2/widget/ViewPager2$1;
invoke-direct {v1, p0}, Landroidx/viewpager2/widget/ViewPager2$1;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iput-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
const/4 v1, -0x1
iput v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v2, 0x0
iput-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
const/4 v0, 0x1
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mUserInputEnabled:Z
iput v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mOffscreenPageLimit:I
invoke-direct {p0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2;->initialize(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 2
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-direct {p0, p1, p2, p3}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
new-instance p3, Landroid/graphics/Rect;
invoke-direct {p3}, Landroid/graphics/Rect;-><init>()V
iput-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
new-instance p3, Landroid/graphics/Rect;
invoke-direct {p3}, Landroid/graphics/Rect;-><init>()V
iput-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpChildRect:Landroid/graphics/Rect;
new-instance p3, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 v0, 0x3
invoke-direct {p3, v0}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;-><init>(I)V
iput-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 p3, 0x0
iput-boolean p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDirty:Z
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$1;
invoke-direct {v0, p0}, Landroidx/viewpager2/widget/ViewPager2$1;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
const/4 v0, -0x1
iput v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v1, 0x0
iput-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
iput-boolean p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
const/4 p3, 0x1
iput-boolean p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mUserInputEnabled:Z
iput v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mOffscreenPageLimit:I
invoke-direct {p0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2;->initialize(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
.locals 1
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/util/AttributeSet;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/RequiresApi;
value = 0x15
.end annotation
invoke-direct {p0, p1, p2, p3, p4}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
new-instance p3, Landroid/graphics/Rect;
invoke-direct {p3}, Landroid/graphics/Rect;-><init>()V
iput-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
new-instance p3, Landroid/graphics/Rect;
invoke-direct {p3}, Landroid/graphics/Rect;-><init>()V
iput-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpChildRect:Landroid/graphics/Rect;
new-instance p3, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 p4, 0x3
invoke-direct {p3, p4}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;-><init>(I)V
iput-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 p3, 0x0
iput-boolean p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDirty:Z
new-instance p4, Landroidx/viewpager2/widget/ViewPager2$1;
invoke-direct {p4, p0}, Landroidx/viewpager2/widget/ViewPager2$1;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iput-object p4, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
const/4 p4, -0x1
iput p4, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v0, 0x0
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
iput-boolean p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
const/4 p3, 0x1
iput-boolean p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mUserInputEnabled:Z
iput p4, p0, Landroidx/viewpager2/widget/ViewPager2;->mOffscreenPageLimit:I
invoke-direct {p0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2;->initialize(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method private enforceChildFillListener()Landroidx/recyclerview/widget/RecyclerView$OnChildAttachStateChangeListener;
.locals 1
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$4;
invoke-direct {v0, p0}, Landroidx/viewpager2/widget/ViewPager2$4;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
return-object v0
.end method
.method private initialize(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 2
sget-boolean v0, Landroidx/viewpager2/widget/ViewPager2;->sFeatureEnhancedA11yEnabled:Z
if-eqz v0, :cond_0
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$PageAwareAccessibilityProvider;
invoke-direct {v0, p0}, Landroidx/viewpager2/widget/ViewPager2$PageAwareAccessibilityProvider;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
goto :goto_0
:cond_0
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$BasicAccessibilityProvider;
invoke-direct {v0, p0}, Landroidx/viewpager2/widget/ViewPager2$BasicAccessibilityProvider;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
:goto_0
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$RecyclerViewImpl;
invoke-direct {v0, p0, p1}, Landroidx/viewpager2/widget/ViewPager2$RecyclerViewImpl;-><init>(Landroidx/viewpager2/widget/ViewPager2;Landroid/content/Context;)V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-static {}, Landroidx/core/view/ViewCompat;->generateViewId()I
move-result v1
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setId(I)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
const/high16 v1, 0x20000
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setDescendantFocusability(I)V
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$LinearLayoutManagerImpl;
invoke-direct {v0, p0, p1}, Landroidx/viewpager2/widget/ViewPager2$LinearLayoutManagerImpl;-><init>(Landroidx/viewpager2/widget/ViewPager2;Landroid/content/Context;)V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->setScrollingTouchSlop(I)V
invoke-direct {p0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2;->setOrientation(Landroid/content/Context;Landroid/util/AttributeSet;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
new-instance p2, Landroid/view/ViewGroup$LayoutParams;
const/4 v0, -0x1
invoke-direct {p2, v0, v0}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V
invoke-virtual {p1, p2}, Landroid/view/ViewGroup;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-direct {p0}, Landroidx/viewpager2/widget/ViewPager2;->enforceChildFillListener()Landroidx/recyclerview/widget/RecyclerView$OnChildAttachStateChangeListener;
move-result-object p2
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->addOnChildAttachStateChangeListener(Landroidx/recyclerview/widget/RecyclerView$OnChildAttachStateChangeListener;)V
new-instance p1, Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-direct {p1, p0}, Landroidx/viewpager2/widget/ScrollEventAdapter;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iput-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
new-instance p1, Landroidx/viewpager2/widget/FakeDrag;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-direct {p1, p0, p2, v0}, Landroidx/viewpager2/widget/FakeDrag;-><init>(Landroidx/viewpager2/widget/ViewPager2;Landroidx/viewpager2/widget/ScrollEventAdapter;Landroidx/recyclerview/widget/RecyclerView;)V
iput-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mFakeDragger:Landroidx/viewpager2/widget/FakeDrag;
new-instance p1, Landroidx/viewpager2/widget/ViewPager2$PagerSnapHelperImpl;
invoke-direct {p1, p0}, Landroidx/viewpager2/widget/ViewPager2$PagerSnapHelperImpl;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iput-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPagerSnapHelper:Landroidx/recyclerview/widget/PagerSnapHelper;
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPagerSnapHelper:Landroidx/recyclerview/widget/PagerSnapHelper;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/SnapHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->addOnScrollListener(Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V
new-instance p1, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
const/4 p2, 0x3
invoke-direct {p1, p2}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;-><init>(I)V
iput-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {p1, p2}, Landroidx/viewpager2/widget/ScrollEventAdapter;->setOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
new-instance p1, Landroidx/viewpager2/widget/ViewPager2$2;
invoke-direct {p1, p0}, Landroidx/viewpager2/widget/ViewPager2$2;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
new-instance p2, Landroidx/viewpager2/widget/ViewPager2$3;
invoke-direct {p2, p0}, Landroidx/viewpager2/widget/ViewPager2$3;-><init>(Landroidx/viewpager2/widget/ViewPager2;)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->addOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {p1, p2}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->addOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1, p2, v0}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onInitialize(Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;Landroidx/recyclerview/widget/RecyclerView;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {p1, p2}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->addOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
new-instance p1, Landroidx/viewpager2/widget/PageTransformerAdapter;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-direct {p1, p2}, Landroidx/viewpager2/widget/PageTransformerAdapter;-><init>(Landroidx/recyclerview/widget/LinearLayoutManager;)V
iput-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
invoke-virtual {p1, p2}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->addOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
const/4 p2, 0x0
invoke-virtual {p1}, Landroid/view/ViewGroup;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
invoke-virtual {p0, p1, p2, v0}, Landroid/view/ViewGroup;->attachViewToParent(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
return-void
.end method
.method private registerCurrentItemDataSetTracker(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
.locals 1
.param p1 # Landroidx/recyclerview/widget/RecyclerView$Adapter;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
"*>;)V"
}
.end annotation
if-eqz p1, :cond_0
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->registerAdapterDataObserver(Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;)V
:cond_0
return-void
.end method
.method private restorePendingState()V
.locals 4
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v1, -0x1
if-ne v0, v1, :cond_0
return-void
:cond_0
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
move-result-object v0
if-nez v0, :cond_1
return-void
:cond_1
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingAdapterState:Landroid/os/Parcelable;
if-eqz v2, :cond_3
instance-of v3, v0, Landroidx/viewpager2/adapter/StatefulAdapter;
if-eqz v3, :cond_2
move-object v3, v0
check-cast v3, Landroidx/viewpager2/adapter/StatefulAdapter;
invoke-interface {v3, v2}, Landroidx/viewpager2/adapter/StatefulAdapter;->restoreState(Landroid/os/Parcelable;)V
:cond_2
const/4 v2, 0x0
iput-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingAdapterState:Landroid/os/Parcelable;
:cond_3
const/4 v2, 0x0
iget v3, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I
move-result v0
add-int/lit8 v0, v0, -0x1
invoke-static {v3, v0}, Ljava/lang/Math;->min(II)I
move-result v0
invoke-static {v2, v0}, Ljava/lang/Math;->max(II)I
move-result v0
iput v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
iput v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->scrollToPosition(I)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onRestorePendingState()V
return-void
.end method
.method private setOrientation(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 8
sget-object v0, Landroidx/viewpager2/R$styleable;->ViewPager2:[I
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object v0
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x1d
if-lt v1, v2, :cond_0
sget-object v3, Landroidx/viewpager2/R$styleable;->ViewPager2:[I
const/4 v6, 0x0
const/4 v7, 0x0
move-object v1, p0
move-object v2, p1
move-object v4, p2
move-object v5, v0
invoke-virtual/range {v1 .. v7}, Landroid/view/ViewGroup;->saveAttributeDataForStyleable(Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;II)V
:cond_0
:try_start_0
sget p1, Landroidx/viewpager2/R$styleable;->ViewPager2_android_orientation:I
const/4 p2, 0x0
invoke-virtual {v0, p1, p2}, Landroid/content/res/TypedArray;->getInt(II)I
move-result p1
invoke-virtual {p0, p1}, Landroidx/viewpager2/widget/ViewPager2;->setOrientation(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
return-void
:catchall_0
move-exception p1
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
throw p1
.end method
.method private unregisterCurrentItemDataSetTracker(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
.locals 1
.param p1 # Landroidx/recyclerview/widget/RecyclerView$Adapter;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
"*>;)V"
}
.end annotation
if-eqz p1, :cond_0
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDataSetChangeObserver:Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->unregisterAdapterDataObserver(Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;)V
:cond_0
return-void
.end method
# virtual methods
.method public addItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
.locals 1
.param p1 # Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView;->addItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
return-void
.end method
.method public addItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;I)V
.locals 1
.param p1 # Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->addItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;I)V
return-void
.end method
.method public beginFakeDrag()Z
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mFakeDragger:Landroidx/viewpager2/widget/FakeDrag;
invoke-virtual {v0}, Landroidx/viewpager2/widget/FakeDrag;->beginFakeDrag()Z
move-result v0
return v0
.end method
.method public canScrollHorizontally(I)Z
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->canScrollHorizontally(I)Z
move-result p1
return p1
.end method
.method public canScrollVertically(I)Z
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->canScrollVertically(I)Z
move-result p1
return p1
.end method
.method public dispatchRestoreInstanceState(Landroid/util/SparseArray;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/util/SparseArray<",
"Landroid/os/Parcelable;",
">;)V"
}
.end annotation
invoke-virtual {p0}, Landroid/view/ViewGroup;->getId()I
move-result v0
invoke-virtual {p1, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/Parcelable;
instance-of v1, v0, Landroidx/viewpager2/widget/ViewPager2$SavedState;
if-eqz v1, :cond_0
check-cast v0, Landroidx/viewpager2/widget/ViewPager2$SavedState;
iget v0, v0, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mRecyclerViewId:I
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v1}, Landroid/view/ViewGroup;->getId()I
move-result v1
invoke-virtual {p1, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
move-result-object v2
invoke-virtual {p1, v1, v2}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
invoke-virtual {p1, v0}, Landroid/util/SparseArray;->remove(I)V
:cond_0
invoke-super {p0, p1}, Landroid/view/ViewGroup;->dispatchRestoreInstanceState(Landroid/util/SparseArray;)V
invoke-direct {p0}, Landroidx/viewpager2/widget/ViewPager2;->restorePendingState()V
return-void
.end method
.method public endFakeDrag()Z
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mFakeDragger:Landroidx/viewpager2/widget/FakeDrag;
invoke-virtual {v0}, Landroidx/viewpager2/widget/FakeDrag;->endFakeDrag()Z
move-result v0
return v0
.end method
.method public fakeDragBy(F)Z
.locals 1
.param p1 # F
.annotation build Landroid/annotation/SuppressLint;
value = {
"SupportAnnotationUsage"
}
.end annotation
.annotation build Landroidx/annotation/Px;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mFakeDragger:Landroidx/viewpager2/widget/FakeDrag;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/FakeDrag;->fakeDragBy(F)Z
move-result p1
return p1
.end method
.method public getAccessibilityClassName()Ljava/lang/CharSequence;
.locals 1
.annotation build Landroidx/annotation/RequiresApi;
value = 0x17
.end annotation
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->handlesGetAccessibilityClassName()Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onGetAccessibilityClassName()Ljava/lang/String;
move-result-object v0
return-object v0
:cond_0
invoke-super {p0}, Landroid/view/ViewGroup;->getAccessibilityClassName()Ljava/lang/CharSequence;
move-result-object v0
return-object v0
.end method
.method public getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
.locals 1
.annotation build Landroidx/annotation/Nullable;
.end annotation
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
move-result-object v0
return-object v0
.end method
.method public getCurrentItem()I
.locals 1
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
return v0
.end method
.method public getItemDecorationAt(I)Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView;->getItemDecorationAt(I)Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;
move-result-object p1
return-object p1
.end method
.method public getItemDecorationCount()I
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getItemDecorationCount()I
move-result v0
return v0
.end method
.method public getOffscreenPageLimit()I
.locals 1
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mOffscreenPageLimit:I
return v0
.end method
.method public getOrientation()I
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->getOrientation()I
move-result v0
return v0
.end method
.method public getPageSize()I
.locals 3
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->getOrientation()I
move-result v1
if-nez v1, :cond_0
invoke-virtual {v0}, Landroid/view/ViewGroup;->getWidth()I
move-result v1
invoke-virtual {v0}, Landroid/view/ViewGroup;->getPaddingLeft()I
move-result v2
sub-int/2addr v1, v2
invoke-virtual {v0}, Landroid/view/ViewGroup;->getPaddingRight()I
move-result v0
goto :goto_0
:cond_0
invoke-virtual {v0}, Landroid/view/ViewGroup;->getHeight()I
move-result v1
invoke-virtual {v0}, Landroid/view/ViewGroup;->getPaddingTop()I
move-result v2
sub-int/2addr v1, v2
invoke-virtual {v0}, Landroid/view/ViewGroup;->getPaddingBottom()I
move-result v0
:goto_0
sub-int/2addr v1, v0
return v1
.end method
.method public getScrollState()I
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ScrollEventAdapter;->getScrollState()I
move-result v0
return v0
.end method
.method public invalidateItemDecorations()V
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->invalidateItemDecorations()V
return-void
.end method
.method public isFakeDragging()Z
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mFakeDragger:Landroidx/viewpager2/widget/FakeDrag;
invoke-virtual {v0}, Landroidx/viewpager2/widget/FakeDrag;->isFakeDragging()Z
move-result v0
return v0
.end method
.method public isRtl()Z
.locals 2
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;->getLayoutDirection()I
move-result v0
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 isUserInputEnabled()Z
.locals 1
iget-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mUserInputEnabled:Z
return v0
.end method
.method public onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
.locals 1
invoke-super {p0, p1}, Landroid/view/ViewGroup;->onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onInitializeAccessibilityNodeInfo(Landroid/view/accessibility/AccessibilityNodeInfo;)V
return-void
.end method
.method public onLayout(ZIIII)V
.locals 3
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1}, Landroid/view/ViewGroup;->getMeasuredWidth()I
move-result p1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroid/view/ViewGroup;->getMeasuredHeight()I
move-result v0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingLeft()I
move-result v2
iput v2, v1, Landroid/graphics/Rect;->left:I
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
sub-int/2addr p4, p2
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingRight()I
move-result p2
sub-int/2addr p4, p2
iput p4, v1, Landroid/graphics/Rect;->right:I
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingTop()I
move-result p4
iput p4, p2, Landroid/graphics/Rect;->top:I
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
sub-int/2addr p5, p3
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingBottom()I
move-result p3
sub-int/2addr p5, p3
iput p5, p2, Landroid/graphics/Rect;->bottom:I
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpContainerRect:Landroid/graphics/Rect;
iget-object p3, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpChildRect:Landroid/graphics/Rect;
const p4, 0x800033
invoke-static {p4, p1, v0, p2, p3}, Landroid/view/Gravity;->apply(IIILandroid/graphics/Rect;Landroid/graphics/Rect;)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mTmpChildRect:Landroid/graphics/Rect;
iget p3, p2, Landroid/graphics/Rect;->left:I
iget p4, p2, Landroid/graphics/Rect;->top:I
iget p5, p2, Landroid/graphics/Rect;->right:I
iget p2, p2, Landroid/graphics/Rect;->bottom:I
invoke-virtual {p1, p3, p4, p5, p2}, Landroid/view/ViewGroup;->layout(IIII)V
iget-boolean p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDirty:Z
if-eqz p1, :cond_0
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->updateCurrentItem()V
:cond_0
return-void
.end method
.method public onMeasure(II)V
.locals 5
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p0, v0, p1, p2}, Landroid/view/ViewGroup;->measureChild(Landroid/view/View;II)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroid/view/ViewGroup;->getMeasuredWidth()I
move-result v0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v1}, Landroid/view/ViewGroup;->getMeasuredHeight()I
move-result v1
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v2}, Landroid/view/ViewGroup;->getMeasuredState()I
move-result v2
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingLeft()I
move-result v3
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingRight()I
move-result v4
add-int/2addr v4, v3
add-int/2addr v4, v0
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingTop()I
move-result v0
invoke-virtual {p0}, Landroid/view/ViewGroup;->getPaddingBottom()I
move-result v3
add-int/2addr v3, v0
add-int/2addr v3, v1
invoke-virtual {p0}, Landroid/view/ViewGroup;->getSuggestedMinimumWidth()I
move-result v0
invoke-static {v4, v0}, Ljava/lang/Math;->max(II)I
move-result v0
invoke-virtual {p0}, Landroid/view/ViewGroup;->getSuggestedMinimumHeight()I
move-result v1
invoke-static {v3, v1}, Ljava/lang/Math;->max(II)I
move-result v1
invoke-static {v0, p1, v2}, Landroid/view/ViewGroup;->resolveSizeAndState(III)I
move-result p1
shl-int/lit8 v0, v2, 0x10
invoke-static {v1, p2, v0}, Landroid/view/ViewGroup;->resolveSizeAndState(III)I
move-result p2
invoke-virtual {p0, p1, p2}, Landroid/view/ViewGroup;->setMeasuredDimension(II)V
return-void
.end method
.method public onRestoreInstanceState(Landroid/os/Parcelable;)V
.locals 1
instance-of v0, p1, Landroidx/viewpager2/widget/ViewPager2$SavedState;
if-nez v0, :cond_0
invoke-super {p0, p1}, Landroid/view/ViewGroup;->onRestoreInstanceState(Landroid/os/Parcelable;)V
return-void
:cond_0
check-cast p1, Landroidx/viewpager2/widget/ViewPager2$SavedState;
invoke-virtual {p1}, Landroid/view/View$BaseSavedState;->getSuperState()Landroid/os/Parcelable;
move-result-object v0
invoke-super {p0, v0}, Landroid/view/ViewGroup;->onRestoreInstanceState(Landroid/os/Parcelable;)V
iget v0, p1, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mCurrentItem:I
iput v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
iget-object p1, p1, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mAdapterState:Landroid/os/Parcelable;
iput-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingAdapterState:Landroid/os/Parcelable;
return-void
.end method
.method public onSaveInstanceState()Landroid/os/Parcelable;
.locals 3
.annotation build Landroidx/annotation/Nullable;
.end annotation
invoke-super {p0}, Landroid/view/ViewGroup;->onSaveInstanceState()Landroid/os/Parcelable;
move-result-object v0
new-instance v1, Landroidx/viewpager2/widget/ViewPager2$SavedState;
invoke-direct {v1, v0}, Landroidx/viewpager2/widget/ViewPager2$SavedState;-><init>(Landroid/os/Parcelable;)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroid/view/ViewGroup;->getId()I
move-result v0
iput v0, v1, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mRecyclerViewId:I
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v2, -0x1
if-ne v0, v2, :cond_0
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
:cond_0
iput v0, v1, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mCurrentItem:I
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingAdapterState:Landroid/os/Parcelable;
if-eqz v0, :cond_1
iput-object v0, v1, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mAdapterState:Landroid/os/Parcelable;
goto :goto_0
:cond_1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
move-result-object v0
instance-of v2, v0, Landroidx/viewpager2/adapter/StatefulAdapter;
if-eqz v2, :cond_2
check-cast v0, Landroidx/viewpager2/adapter/StatefulAdapter;
invoke-interface {v0}, Landroidx/viewpager2/adapter/StatefulAdapter;->saveState()Landroid/os/Parcelable;
move-result-object v0
iput-object v0, v1, Landroidx/viewpager2/widget/ViewPager2$SavedState;->mAdapterState:Landroid/os/Parcelable;
:cond_2
:goto_0
return-object v1
.end method
.method public onViewAdded(Landroid/view/View;)V
.locals 2
new-instance p1, Ljava/lang/IllegalStateException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-class v1, Landroidx/viewpager2/widget/ViewPager2;
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, " does not support direct child views"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public performAccessibilityAction(ILandroid/os/Bundle;)Z
.locals 1
.annotation build Landroidx/annotation/RequiresApi;
value = 0x10
.end annotation
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->handlesPerformAccessibilityAction(ILandroid/os/Bundle;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onPerformAccessibilityAction(ILandroid/os/Bundle;)Z
move-result p1
return p1
:cond_0
invoke-super {p0, p1, p2}, Landroid/view/ViewGroup;->performAccessibilityAction(ILandroid/os/Bundle;)Z
move-result p1
return p1
.end method
.method public registerOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
.locals 1
.param p1 # Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->addOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
return-void
.end method
.method public removeItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
.locals 1
.param p1 # Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView;->removeItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
return-void
.end method
.method public removeItemDecorationAt(I)V
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView;->removeItemDecorationAt(I)V
return-void
.end method
.method public requestTransform()V
.locals 5
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
invoke-virtual {v0}, Landroidx/viewpager2/widget/PageTransformerAdapter;->getPageTransformer()Landroidx/viewpager2/widget/ViewPager2$PageTransformer;
move-result-object v0
if-nez v0, :cond_0
return-void
:cond_0
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ScrollEventAdapter;->getRelativeScrollPosition()D
move-result-wide v0
double-to-int v2, v0
int-to-double v3, v2
sub-double/2addr v0, v3
double-to-float v0, v0
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->getPageSize()I
move-result v1
int-to-float v1, v1
mul-float v1, v1, v0
invoke-static {v1}, Ljava/lang/Math;->round(F)I
move-result v1
iget-object v3, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
invoke-virtual {v3, v2, v0, v1}, Landroidx/viewpager2/widget/PageTransformerAdapter;->onPageScrolled(IFI)V
return-void
.end method
.method public setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
.locals 2
.param p1 # Landroidx/recyclerview/widget/RecyclerView$Adapter;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
move-result-object v0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v1, v0}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onDetachAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
invoke-direct {p0, v0}, Landroidx/viewpager2/widget/ViewPager2;->unregisterCurrentItemDataSetTracker(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
const/4 v0, 0x0
iput v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
invoke-direct {p0}, Landroidx/viewpager2/widget/ViewPager2;->restorePendingState()V
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onAttachAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
invoke-direct {p0, p1}, Landroidx/viewpager2/widget/ViewPager2;->registerCurrentItemDataSetTracker(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
return-void
.end method
.method public setCurrentItem(I)V
.locals 1
const/4 v0, 0x1
invoke-virtual {p0, p1, v0}, Landroidx/viewpager2/widget/ViewPager2;->setCurrentItem(IZ)V
return-void
.end method
.method public setCurrentItem(IZ)V
.locals 1
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->isFakeDragging()Z
move-result v0
if-nez v0, :cond_0
invoke-virtual {p0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2;->setCurrentItemInternal(IZ)V
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "Cannot change current item when ViewPager2 is fake dragging"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public setCurrentItemInternal(IZ)V
.locals 8
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
move-result-object v0
const/4 v1, 0x0
if-nez v0, :cond_1
iget p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
const/4 v0, -0x1
if-eq p2, v0, :cond_0
invoke-static {p1, v1}, Ljava/lang/Math;->max(II)I
move-result p1
iput p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPendingCurrentItem:I
:cond_0
return-void
:cond_1
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I
move-result v2
if-gtz v2, :cond_2
return-void
:cond_2
invoke-static {p1, v1}, Ljava/lang/Math;->max(II)I
move-result p1
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I
move-result v0
add-int/lit8 v0, v0, -0x1
invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I
move-result p1
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
if-ne p1, v0, :cond_3
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ScrollEventAdapter;->isIdle()Z
move-result v0
if-eqz v0, :cond_3
return-void
:cond_3
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
if-ne p1, v0, :cond_4
if-eqz p2, :cond_4
return-void
:cond_4
iget v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
int-to-double v0, v0
iput p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {v2}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onSetNewCurrentItem()V
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {v2}, Landroidx/viewpager2/widget/ScrollEventAdapter;->isIdle()Z
move-result v2
if-nez v2, :cond_5
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {v0}, Landroidx/viewpager2/widget/ScrollEventAdapter;->getRelativeScrollPosition()D
move-result-wide v0
:cond_5
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mScrollEventAdapter:Landroidx/viewpager2/widget/ScrollEventAdapter;
invoke-virtual {v2, p1, p2}, Landroidx/viewpager2/widget/ScrollEventAdapter;->notifyProgrammaticScroll(IZ)V
if-nez p2, :cond_6
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p2, p1}, Landroidx/recyclerview/widget/RecyclerView;->scrollToPosition(I)V
return-void
:cond_6
int-to-double v2, p1
sub-double v4, v2, v0
invoke-static {v4, v5}, Ljava/lang/Math;->abs(D)D
move-result-wide v4
const-wide/high16 v6, 0x4008000000000000L # 3.0
cmpl-double p2, v4, v6
if-lez p2, :cond_8
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
cmpl-double v4, v2, v0
if-lez v4, :cond_7
add-int/lit8 v0, p1, -0x3
goto :goto_0
:cond_7
add-int/lit8 v0, p1, 0x3
:goto_0
invoke-virtual {p2, v0}, Landroidx/recyclerview/widget/RecyclerView;->scrollToPosition(I)V
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
new-instance v0, Landroidx/viewpager2/widget/ViewPager2$SmoothScrollToPosition;
invoke-direct {v0, p1, p2}, Landroidx/viewpager2/widget/ViewPager2$SmoothScrollToPosition;-><init>(ILandroidx/recyclerview/widget/RecyclerView;)V
invoke-virtual {p2, v0}, Landroid/view/ViewGroup;->post(Ljava/lang/Runnable;)Z
goto :goto_1
:cond_8
iget-object p2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p2, p1}, Landroidx/recyclerview/widget/RecyclerView;->smoothScrollToPosition(I)V
:goto_1
return-void
.end method
.method public setLayoutDirection(I)V
.locals 0
.annotation build Landroidx/annotation/RequiresApi;
value = 0x11
.end annotation
invoke-super {p0, p1}, Landroid/view/ViewGroup;->setLayoutDirection(I)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {p1}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onSetLayoutDirection()V
return-void
.end method
.method public setOffscreenPageLimit(I)V
.locals 1
const/4 v0, 0x1
if-ge p1, v0, :cond_1
const/4 v0, -0x1
if-ne p1, v0, :cond_0
goto :goto_0
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Offscreen page limit must be OFFSCREEN_PAGE_LIMIT_DEFAULT or a number > 0"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_1
:goto_0
iput p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mOffscreenPageLimit:I
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView;->requestLayout()V
return-void
.end method
.method public setOrientation(I)V
.locals 1
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/LinearLayoutManager;->setOrientation(I)V
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {p1}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onSetOrientation()V
return-void
.end method
.method public setPageTransformer(Landroidx/viewpager2/widget/ViewPager2$PageTransformer;)V
.locals 3
.param p1 # Landroidx/viewpager2/widget/ViewPager2$PageTransformer;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
const/4 v0, 0x0
if-eqz p1, :cond_1
iget-boolean v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
if-nez v1, :cond_0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v1}, Landroidx/recyclerview/widget/RecyclerView;->getItemAnimator()Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
move-result-object v1
iput-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
const/4 v1, 0x1
iput-boolean v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
:cond_0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {v1, v0}, Landroidx/recyclerview/widget/RecyclerView;->setItemAnimator(Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;)V
goto :goto_0
:cond_1
iget-boolean v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
if-eqz v1, :cond_2
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
invoke-virtual {v1, v2}, Landroidx/recyclerview/widget/RecyclerView;->setItemAnimator(Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;)V
iput-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimator:Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mSavedItemAnimatorPresent:Z
:cond_2
:goto_0
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
invoke-virtual {v0}, Landroidx/viewpager2/widget/PageTransformerAdapter;->getPageTransformer()Landroidx/viewpager2/widget/ViewPager2$PageTransformer;
move-result-object v0
if-ne p1, v0, :cond_3
return-void
:cond_3
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageTransformerAdapter:Landroidx/viewpager2/widget/PageTransformerAdapter;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/PageTransformerAdapter;->setPageTransformer(Landroidx/viewpager2/widget/ViewPager2$PageTransformer;)V
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->requestTransform()V
return-void
.end method
.method public setUserInputEnabled(Z)V
.locals 0
iput-boolean p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mUserInputEnabled:Z
iget-object p1, p0, Landroidx/viewpager2/widget/ViewPager2;->mAccessibilityProvider:Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;
invoke-virtual {p1}, Landroidx/viewpager2/widget/ViewPager2$AccessibilityProvider;->onSetUserInputEnabled()V
return-void
.end method
.method public snapToPage()V
.locals 4
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPagerSnapHelper:Landroidx/recyclerview/widget/PagerSnapHelper;
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/PagerSnapHelper;->findSnapView(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)Landroid/view/View;
move-result-object v0
if-nez v0, :cond_0
return-void
:cond_0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPagerSnapHelper:Landroidx/recyclerview/widget/PagerSnapHelper;
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v1, v2, v0}, Landroidx/recyclerview/widget/PagerSnapHelper;->calculateDistanceToFinalSnap(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;Landroid/view/View;)[I
move-result-object v0
const/4 v1, 0x0
aget v2, v0, v1
const/4 v3, 0x1
if-nez v2, :cond_1
aget v2, v0, v3
if-eqz v2, :cond_2
:cond_1
iget-object v2, p0, Landroidx/viewpager2/widget/ViewPager2;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
aget v1, v0, v1
aget v0, v0, v3
invoke-virtual {v2, v1, v0}, Landroidx/recyclerview/widget/RecyclerView;->smoothScrollBy(II)V
:cond_2
return-void
.end method
.method public unregisterOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
.locals 1
.param p1 # Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mExternalPageChangeCallbacks:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {v0, p1}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->removeOnPageChangeCallback(Landroidx/viewpager2/widget/ViewPager2$OnPageChangeCallback;)V
return-void
.end method
.method public updateCurrentItem()V
.locals 2
iget-object v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mPagerSnapHelper:Landroidx/recyclerview/widget/PagerSnapHelper;
if-eqz v0, :cond_2
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/PagerSnapHelper;->findSnapView(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)Landroid/view/View;
move-result-object v0
if-nez v0, :cond_0
return-void
:cond_0
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {v1, v0}, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;->getPosition(Landroid/view/View;)I
move-result v0
iget v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItem:I
if-eq v0, v1, :cond_1
invoke-virtual {p0}, Landroidx/viewpager2/widget/ViewPager2;->getScrollState()I
move-result v1
if-nez v1, :cond_1
iget-object v1, p0, Landroidx/viewpager2/widget/ViewPager2;->mPageChangeEventDispatcher:Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;
invoke-virtual {v1, v0}, Landroidx/viewpager2/widget/CompositeOnPageChangeCallback;->onPageSelected(I)V
:cond_1
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/viewpager2/widget/ViewPager2;->mCurrentItemDirty:Z
return-void
:cond_2
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Design assumption violated."
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method