242 lines
7.0 KiB
Smali
242 lines
7.0 KiB
Smali
.class public Lcom/moji/newliveview/detail/PictureDetailAdapter;
|
|
.super Landroid/support/v4/app/FragmentStatePagerAdapter;
|
|
.source "PictureDetailAdapter.java"
|
|
|
|
|
|
# instance fields
|
|
.field private a:Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
.field private b:Ljava/util/ArrayList;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/moji/http/snsforum/entity/ThumbPictureItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private c:Landroid/support/v4/util/ArrayMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroid/support/v4/util/ArrayMap<",
|
|
"Ljava/lang/Integer;",
|
|
"Lcom/moji/newliveview/detail/PictureDetailFragment;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/support/v4/app/FragmentManager;Ljava/util/ArrayList;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/support/v4/app/FragmentManager;",
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/moji/http/snsforum/entity/ThumbPictureItem;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 25
|
|
invoke-direct {p0, p1}, Landroid/support/v4/app/FragmentStatePagerAdapter;-><init>(Landroid/support/v4/app/FragmentManager;)V
|
|
|
|
.line 22
|
|
new-instance p1, Landroid/support/v4/util/ArrayMap;
|
|
|
|
invoke-direct {p1}, Landroid/support/v4/util/ArrayMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->c:Landroid/support/v4/util/ArrayMap;
|
|
|
|
.line 26
|
|
iput-object p2, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->b:Ljava/util/ArrayList;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(ZLcom/moji/newliveview/detail/PictureDetailFragment;)V
|
|
.locals 0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 69
|
|
invoke-virtual {p2, p1}, Lcom/moji/newliveview/detail/PictureDetailFragment;->a(Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(I)Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
.locals 1
|
|
|
|
.line 54
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->c:Landroid/support/v4/util/ArrayMap;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v4/util/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a(Z)V
|
|
.locals 1
|
|
|
|
.line 73
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a:Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 74
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a:Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/newliveview/detail/PictureDetailFragment;->a(Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
|
|
.locals 2
|
|
|
|
.line 49
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->c:Landroid/support/v4/util/ArrayMap;
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v4/util/ArrayMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 50
|
|
invoke-super {p0, p1, p2, p3}, Landroid/support/v4/app/FragmentStatePagerAdapter;->destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getCount()I
|
|
.locals 1
|
|
|
|
.line 44
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->b:Ljava/util/ArrayList;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->b:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public getItem(I)Landroid/support/v4/app/Fragment;
|
|
.locals 4
|
|
|
|
.line 31
|
|
iget-object v0, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->c:Landroid/support/v4/util/ArrayMap;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v4/util/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 33
|
|
new-instance v0, Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
invoke-direct {v0}, Lcom/moji/newliveview/detail/PictureDetailFragment;-><init>()V
|
|
|
|
.line 34
|
|
new-instance v1, Landroid/os/Bundle;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
invoke-direct {v1, v2}, Landroid/os/Bundle;-><init>(I)V
|
|
|
|
const-string v2, "extra_data_picture_item"
|
|
|
|
.line 35
|
|
iget-object v3, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->b:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v3, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Landroid/os/Parcelable;
|
|
|
|
invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
.line 36
|
|
invoke-virtual {v0, v1}, Lcom/moji/newliveview/detail/PictureDetailFragment;->setArguments(Landroid/os/Bundle;)V
|
|
|
|
.line 37
|
|
iget-object v1, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->c:Landroid/support/v4/util/ArrayMap;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v1, p1, v0}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public setPrimaryItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
.line 59
|
|
invoke-super {p0, p1, p2, p3}, Landroid/support/v4/app/FragmentStatePagerAdapter;->setPrimaryItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
|
|
|
|
.line 60
|
|
check-cast p3, Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
.line 61
|
|
iget-object p1, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a:Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
if-eq p3, p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 62
|
|
iget-object p2, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a:Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a(ZLcom/moji/newliveview/detail/PictureDetailFragment;)V
|
|
|
|
.line 63
|
|
iput-object p3, p0, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a:Lcom/moji/newliveview/detail/PictureDetailFragment;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 64
|
|
invoke-direct {p0, p1, p3}, Lcom/moji/newliveview/detail/PictureDetailAdapter;->a(ZLcom/moji/newliveview/detail/PictureDetailFragment;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|