BaseSupportRtlFragmentPagerAdapter.smali
.class public abstract Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;
.super Landroidx/fragment/app/FragmentStatePagerAdapter;
.source "SourceFile"
# instance fields
.field private final a:Landroid/util/SparseIntArray;
# direct methods
.method public constructor <init>(Landroidx/fragment/app/FragmentManager;)V
.registers 2
.line 27
invoke-direct {p0, p1}, Landroidx/fragment/app/FragmentStatePagerAdapter;-><init>(Landroidx/fragment/app/FragmentManager;)V
.line 24
new-instance p1, Landroid/util/SparseIntArray;
invoke-direct {p1}, Landroid/util/SparseIntArray;-><init>()V
iput-object p1, p0, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a:Landroid/util/SparseIntArray;
return-void
.end method
.method public constructor <init>(Landroidx/fragment/app/FragmentManager;I)V
.registers 3
.line 31
invoke-direct {p0, p1, p2}, Landroidx/fragment/app/FragmentStatePagerAdapter;-><init>(Landroidx/fragment/app/FragmentManager;I)V
.line 24
new-instance p1, Landroid/util/SparseIntArray;
invoke-direct {p1}, Landroid/util/SparseIntArray;-><init>()V
iput-object p1, p0, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a:Landroid/util/SparseIntArray;
return-void
.end method
.method private b(I)I
.registers 3
.line 102
invoke-static {}, Lcom/singbox/util/t;->a()Z
move-result v0
if-eqz v0, :cond_11
.line 103
invoke-virtual {p0}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->getCount()I
move-result v0
sub-int/2addr v0, p1
add-int/lit8 v0, v0, -0x1
if-gez v0, :cond_10
const/4 v0, 0x0
:cond_10
return v0
:cond_11
return p1
.end method
# virtual methods
.method public a(Ljava/lang/Object;)I
.registers 2
.line 98
invoke-super {p0, p1}, Landroidx/fragment/app/FragmentStatePagerAdapter;->getItemPosition(Ljava/lang/Object;)I
move-result p1
return p1
.end method
.method public abstract a(I)Landroidx/fragment/app/Fragment;
.end method
.method public a(Landroid/view/ViewGroup;I)Ljava/lang/Object;
.registers 3
.line 49
invoke-super {p0, p1, p2}, Landroidx/fragment/app/FragmentStatePagerAdapter;->instantiateItem(Landroid/view/ViewGroup;I)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public a(Landroid/view/ViewGroup;ILjava/lang/Object;)V
.registers 4
.line 65
invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/FragmentStatePagerAdapter;->destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
return-void
.end method
.method public final destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
.registers 6
.line 55
iget-object v0, p0, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a:Landroid/util/SparseIntArray;
invoke-virtual {v0, p2}, Landroid/util/SparseIntArray;->indexOfKey(I)I
move-result v0
if-ltz v0, :cond_14
.line 58
iget-object v0, p0, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a:Landroid/util/SparseIntArray;
invoke-virtual {v0, p2}, Landroid/util/SparseIntArray;->get(I)I
move-result v0
.line 59
iget-object v1, p0, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a:Landroid/util/SparseIntArray;
invoke-virtual {v1, p2}, Landroid/util/SparseIntArray;->delete(I)V
move p2, v0
.line 61
:cond_14
invoke-virtual {p0, p1, p2, p3}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a(Landroid/view/ViewGroup;ILjava/lang/Object;)V
return-void
.end method
.method public final getItem(I)Landroidx/fragment/app/Fragment;
.registers 2
.line 36
invoke-virtual {p0, p1}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a(I)Landroidx/fragment/app/Fragment;
move-result-object p1
return-object p1
.end method
.method public final getItemPosition(Ljava/lang/Object;)I
.registers 2
.line 89
invoke-virtual {p0, p1}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a(Ljava/lang/Object;)I
move-result p1
if-gez p1, :cond_7
return p1
.line 93
:cond_7
invoke-direct {p0, p1}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->b(I)I
move-result p1
return p1
.end method
.method public final getPageTitle(I)Ljava/lang/CharSequence;
.registers 2
.line 1074
invoke-super {p0, p1}, Landroidx/fragment/app/FragmentStatePagerAdapter;->getPageTitle(I)Ljava/lang/CharSequence;
move-result-object p1
return-object p1
.end method
.method public final getPageWidth(I)F
.registers 2
.line 79
invoke-direct {p0, p1}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->b(I)I
move-result p1
.line 1084
invoke-super {p0, p1}, Landroidx/fragment/app/FragmentStatePagerAdapter;->getPageWidth(I)F
move-result p1
return p1
.end method
.method public final instantiateItem(Landroid/view/ViewGroup;I)Ljava/lang/Object;
.registers 5
.line 43
invoke-direct {p0, p2}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->b(I)I
move-result v0
.line 44
iget-object v1, p0, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a:Landroid/util/SparseIntArray;
invoke-virtual {v1, p2, v0}, Landroid/util/SparseIntArray;->put(II)V
.line 45
invoke-virtual {p0, p1, v0}, Lcom/singbox/ui/widget/adapter/BaseSupportRtlFragmentPagerAdapter;->a(Landroid/view/ViewGroup;I)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public saveState()Landroid/os/Parcelable;
.registers 6
.line 118
invoke-super {p0}, Landroidx/fragment/app/FragmentStatePagerAdapter;->saveState()Landroid/os/Parcelable;
move-result-object v0
check-cast v0, Landroid/os/Bundle;
if-eqz v0, :cond_25
const-string v1, "states"
.line 120
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getParcelableArray(Ljava/lang/String;)[Landroid/os/Parcelable;
move-result-object v2
if-eqz v2, :cond_21
.line 123
array-length v3, v2
const/4 v4, 0x3
if-le v3, v4, :cond_17
array-length v3, v2
sub-int/2addr v3, v4
goto :goto_18
:cond_17
const/4 v3, 0x0
:goto_18
array-length v4, v2
add-int/lit8 v4, v4, -0x1
invoke-static {v2, v3, v4}, Ljava/util/Arrays;->copyOfRange([Ljava/lang/Object;II)[Ljava/lang/Object;
move-result-object v2
check-cast v2, [Landroid/os/Parcelable;
.line 125
:cond_21
invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putParcelableArray(Ljava/lang/String;[Landroid/os/Parcelable;)V
goto :goto_2a
.line 127
:cond_25
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
:goto_2a
return-object v0
.end method