223 lines
4.8 KiB
Smali
223 lines
4.8 KiB
Smali
.class public Lcom/moji/index/ArticleAdapter;
|
|
.super Lcom/moji/index/common/BasedAdapter;
|
|
.source "ArticleAdapter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/index/ArticleAdapter$NormalHolder;,
|
|
Lcom/moji/index/ArticleAdapter$ArticleThreeHolder;,
|
|
Lcom/moji/index/ArticleAdapter$ArticleOneHolder;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/moji/index/common/BasedAdapter<",
|
|
"Lcom/moji/http/index/IndexResp$IndexRegionListBean$IndexContentListBean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final b:I
|
|
|
|
.field private final c:I
|
|
|
|
.field private final d:I
|
|
|
|
.field private e:Landroid/content/Context;
|
|
|
|
.field private final f:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(I)V
|
|
.locals 2
|
|
|
|
.line 36
|
|
invoke-direct {p0, p1}, Lcom/moji/index/common/BasedAdapter;-><init>(I)V
|
|
|
|
.line 37
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/index/ArticleAdapter;->e:Landroid/content/Context;
|
|
|
|
const-string p1, "#1a1a1a"
|
|
|
|
.line 38
|
|
invoke-static {p1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/index/ArticleAdapter;->b:I
|
|
|
|
const-string p1, "#551a1a1a"
|
|
|
|
.line 39
|
|
invoke-static {p1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/index/ArticleAdapter;->c:I
|
|
|
|
.line 40
|
|
iget-object p1, p0, Lcom/moji/index/ArticleAdapter;->e:Landroid/content/Context;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
.line 41
|
|
sget v0, Lcom/moji/index/R$dimen;->article_image_gap:I
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p1
|
|
|
|
float-to-int p1, p1
|
|
|
|
.line 42
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v0
|
|
|
|
const/high16 v1, 0x41a00000 # 20.0f
|
|
|
|
invoke-static {v1}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v1
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
mul-int/lit8 p1, p1, 0x2
|
|
|
|
sub-int/2addr v0, p1
|
|
|
|
div-int/lit8 v0, v0, 0x3
|
|
|
|
iput v0, p0, Lcom/moji/index/ArticleAdapter;->f:I
|
|
|
|
const/high16 p1, 0x1a000000
|
|
|
|
.line 43
|
|
iput p1, p0, Lcom/moji/index/ArticleAdapter;->d:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/index/ArticleAdapter;)I
|
|
.locals 0
|
|
|
|
.line 26
|
|
iget p0, p0, Lcom/moji/index/ArticleAdapter;->f:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic b(Lcom/moji/index/ArticleAdapter;)I
|
|
.locals 0
|
|
|
|
.line 26
|
|
iget p0, p0, Lcom/moji/index/ArticleAdapter;->b:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic c(Lcom/moji/index/ArticleAdapter;)I
|
|
.locals 0
|
|
|
|
.line 26
|
|
iget p0, p0, Lcom/moji/index/ArticleAdapter;->c:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic d(Lcom/moji/index/ArticleAdapter;)I
|
|
.locals 0
|
|
|
|
.line 26
|
|
iget p0, p0, Lcom/moji/index/ArticleAdapter;->d:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic e(Lcom/moji/index/ArticleAdapter;)Landroid/content/Context;
|
|
.locals 0
|
|
|
|
.line 26
|
|
iget-object p0, p0, Lcom/moji/index/ArticleAdapter;->e:Landroid/content/Context;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected a(I)Lcom/moji/index/common/BaseHolder;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne p1, v1, :cond_0
|
|
|
|
.line 51
|
|
new-instance p1, Lcom/moji/index/ArticleAdapter$ArticleThreeHolder;
|
|
|
|
invoke-direct {p1, p0, v0}, Lcom/moji/index/ArticleAdapter$ArticleThreeHolder;-><init>(Lcom/moji/index/ArticleAdapter;Lcom/moji/index/ArticleAdapter$1;)V
|
|
|
|
return-object p1
|
|
|
|
.line 53
|
|
:cond_0
|
|
new-instance p1, Lcom/moji/index/ArticleAdapter$ArticleOneHolder;
|
|
|
|
invoke-direct {p1, p0, v0}, Lcom/moji/index/ArticleAdapter$ArticleOneHolder;-><init>(Lcom/moji/index/ArticleAdapter;Lcom/moji/index/ArticleAdapter$1;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getItemViewType(I)I
|
|
.locals 1
|
|
|
|
.line 58
|
|
iget-object v0, p0, Lcom/moji/index/ArticleAdapter;->a: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/index/IndexResp$IndexRegionListBean$IndexContentListBean;
|
|
|
|
iget-object p1, p1, Lcom/moji/http/index/IndexResp$IndexRegionListBean$IndexContentListBean;->picture_path_list:Ljava/util/List;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 59
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-ge p1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|