315 lines
8.7 KiB
Smali
315 lines
8.7 KiB
Smali
.class public Lcom/moji/newliveview/dynamic/PreViewImageAdapter;
|
|
.super Landroid/support/v4/view/PagerAdapter;
|
|
.source "PreViewImageAdapter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:Ljava/lang/Object;
|
|
|
|
.field private b:Landroid/content/Context;
|
|
|
|
.field private c:Ljava/util/ArrayList;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/moji/http/snsforum/entity/IPicture;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private d:I
|
|
|
|
.field private e:Lcom/squareup/picasso/Callback;
|
|
|
|
.field private f:Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;I)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/moji/http/snsforum/entity/IPicture;",
|
|
">;I)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 32
|
|
invoke-direct {p0}, Landroid/support/v4/view/PagerAdapter;-><init>()V
|
|
|
|
.line 26
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->a:Ljava/lang/Object;
|
|
|
|
.line 33
|
|
iput-object p1, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->b:Landroid/content/Context;
|
|
|
|
.line 34
|
|
iput-object p2, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->c:Ljava/util/ArrayList;
|
|
|
|
.line 35
|
|
iput p3, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->d:I
|
|
|
|
.line 36
|
|
new-instance p1, Lcom/moji/newliveview/dynamic/PreViewImageAdapter$1;
|
|
|
|
invoke-direct {p1, p0}, Lcom/moji/newliveview/dynamic/PreViewImageAdapter$1;-><init>(Lcom/moji/newliveview/dynamic/PreViewImageAdapter;)V
|
|
|
|
iput-object p1, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->e:Lcom/squareup/picasso/Callback;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/newliveview/dynamic/PreViewImageAdapter;)Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;
|
|
.locals 0
|
|
|
|
.line 25
|
|
iget-object p0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->f:Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private a(I)Lcom/squareup/picasso/Transformation;
|
|
.locals 2
|
|
|
|
.line 93
|
|
iget-object v0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->c:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/moji/http/snsforum/entity/IPicture;
|
|
|
|
.line 94
|
|
invoke-interface {p1}, Lcom/moji/http/snsforum/entity/IPicture;->showWatermark()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 97
|
|
:cond_0
|
|
invoke-interface {p1}, Lcom/moji/http/snsforum/entity/IPicture;->getNick()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 98
|
|
invoke-interface {p1}, Lcom/moji/http/snsforum/entity/IPicture;->url()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 99
|
|
new-instance v1, Lcom/moji/newliveview/dynamic/PreViewImageAdapter$2;
|
|
|
|
invoke-direct {v1, p0, v0, p1}, Lcom/moji/newliveview/dynamic/PreViewImageAdapter$2;-><init>(Lcom/moji/newliveview/dynamic/PreViewImageAdapter;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-object v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 2
|
|
|
|
.line 129
|
|
iget-object v0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->b:Landroid/content/Context;
|
|
|
|
invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->a:Ljava/lang/Object;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/Object;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 130
|
|
iput-object v0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->f:Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;)V
|
|
.locals 0
|
|
|
|
.line 121
|
|
iput-object p1, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->f:Lcom/moji/newliveview/dynamic/PreViewImageAdapter$OnLoadFinishListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public destroyItem(Landroid/view/ViewGroup;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
.line 84
|
|
check-cast p3, Landroid/view/View;
|
|
|
|
invoke-virtual {p1, p3}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getCount()I
|
|
.locals 1
|
|
|
|
.line 55
|
|
iget-object v0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->c:Ljava/util/ArrayList;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
.line 58
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->c:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public instantiateItem(Landroid/view/ViewGroup;I)Ljava/lang/Object;
|
|
.locals 3
|
|
|
|
.line 63
|
|
new-instance v0, Lcom/moji/imageview/TouchImageView;
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lcom/moji/imageview/TouchImageView;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 64
|
|
iget-object v1, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->b:Landroid/content/Context;
|
|
|
|
invoke-static {v1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->c:Ljava/util/ArrayList;
|
|
|
|
.line 65
|
|
invoke-virtual {v2, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/moji/http/snsforum/entity/IPicture;
|
|
|
|
invoke-interface {v2}, Lcom/moji/http/snsforum/entity/IPicture;->url()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;
|
|
|
|
.line 66
|
|
invoke-virtual {v1, v2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/graphics/Bitmap$Config;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 67
|
|
invoke-virtual {v1}, Lcom/squareup/picasso/RequestCreator;->g()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 68
|
|
invoke-virtual {v1}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 69
|
|
invoke-virtual {v1}, Lcom/squareup/picasso/RequestCreator;->h()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 70
|
|
invoke-virtual {v1}, Lcom/squareup/picasso/RequestCreator;->a()Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->a:Ljava/lang/Object;
|
|
|
|
.line 71
|
|
invoke-virtual {v1, v2}, Lcom/squareup/picasso/RequestCreator;->a(Ljava/lang/Object;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 72
|
|
invoke-direct {p0, p2}, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->a(I)Lcom/squareup/picasso/Transformation;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 74
|
|
invoke-virtual {v1, v2}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/Transformation;)Lcom/squareup/picasso/RequestCreator;
|
|
|
|
.line 76
|
|
:cond_0
|
|
iget v2, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->d:I
|
|
|
|
if-ne v2, p2, :cond_1
|
|
|
|
iget-object p2, p0, Lcom/moji/newliveview/dynamic/PreViewImageAdapter;->e:Lcom/squareup/picasso/Callback;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v1, v0, p2}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;Lcom/squareup/picasso/Callback;)V
|
|
|
|
const/4 p2, -0x1
|
|
|
|
.line 78
|
|
invoke-virtual {p1, v0, p2, p2}, Landroid/view/ViewGroup;->addView(Landroid/view/View;II)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isViewFromObject(Landroid/view/View;Ljava/lang/Object;)Z
|
|
.locals 0
|
|
|
|
if-ne p1, p2, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return p1
|
|
.end method
|