240 lines
6.6 KiB
Smali
240 lines
6.6 KiB
Smali
.class public Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;
|
|
.super Landroid/widget/BaseAdapter;
|
|
.source "EarnCreditActivity.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/moji/credit/EarnCreditActivity;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "GridViewAdapter"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field a:Landroid/content/Context;
|
|
|
|
.field b:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/cs/entity/CreditTaskListResp$TaskStatus;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/cs/entity/CreditTaskListResp$TaskStatus;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 317
|
|
invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V
|
|
|
|
.line 318
|
|
iput-object p2, p0, Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;->b:Ljava/util/List;
|
|
|
|
.line 319
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;->a:Landroid/content/Context;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getCount()I
|
|
.locals 1
|
|
|
|
.line 324
|
|
iget-object v0, p0, Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;->b:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getItem(I)Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
.line 329
|
|
iget-object v0, p0, Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;->b:Ljava/util/List;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getItemId(I)J
|
|
.locals 2
|
|
|
|
int-to-long v0, p1
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
|
|
.locals 2
|
|
|
|
const/4 p3, 0x0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 340
|
|
invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 341
|
|
:cond_0
|
|
iget-object p2, p0, Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;->a:Landroid/content/Context;
|
|
|
|
invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object p2
|
|
|
|
.line 342
|
|
sget v0, Lcom/moji/credit/R$layout;->item_earn_credit_gird:I
|
|
|
|
invoke-virtual {p2, v0, p3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
.line 343
|
|
new-instance p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;
|
|
|
|
invoke-direct {p3}, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;-><init>()V
|
|
|
|
.line 344
|
|
sget v0, Lcom/moji/credit/R$id;->earn_credit_grid_item:I
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/LinearLayout;
|
|
|
|
iput-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->a:Landroid/widget/LinearLayout;
|
|
|
|
.line 345
|
|
sget v0, Lcom/moji/credit/R$id;->earn_credit_grid_task_status:I
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
iput-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->b:Landroid/widget/ImageView;
|
|
|
|
.line 346
|
|
sget v0, Lcom/moji/credit/R$id;->earn_credit_grid_task_name:I
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
iput-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->c:Landroid/widget/TextView;
|
|
|
|
.line 347
|
|
invoke-virtual {p2, p3}, Landroid/view/View;->setTag(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
if-nez p3, :cond_2
|
|
|
|
.line 350
|
|
invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;
|
|
|
|
.line 353
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/moji/credit/EarnCreditActivity$GridViewAdapter;->b:Ljava/util/List;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/moji/http/cs/entity/CreditTaskListResp$TaskStatus;
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 355
|
|
iget-boolean v0, p1, Lcom/moji/http/cs/entity/CreditTaskListResp$TaskStatus;->is_done:Z
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 356
|
|
iget-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->a:Landroid/widget/LinearLayout;
|
|
|
|
sget v1, Lcom/moji/credit/R$drawable;->earn_credit_task_done_bg_selector:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V
|
|
|
|
.line 357
|
|
iget-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->b:Landroid/widget/ImageView;
|
|
|
|
sget v1, Lcom/moji/credit/R$drawable;->earn_credit_task_done:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 359
|
|
:cond_3
|
|
iget-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->a:Landroid/widget/LinearLayout;
|
|
|
|
sget v1, Lcom/moji/credit/R$drawable;->earn_credit_task_todo_bg_selector:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V
|
|
|
|
.line 360
|
|
iget-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->b:Landroid/widget/ImageView;
|
|
|
|
sget v1, Lcom/moji/credit/R$drawable;->earn_credit_task_todo:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
.line 362
|
|
:goto_0
|
|
iget-object v0, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->c:Landroid/widget/TextView;
|
|
|
|
iget-object v1, p1, Lcom/moji/http/cs/entity/CreditTaskListResp$TaskStatus;->name:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
.line 363
|
|
iget-boolean p1, p1, Lcom/moji/http/cs/entity/CreditTaskListResp$TaskStatus;->is_done:Z
|
|
|
|
iput-boolean p1, p3, Lcom/moji/credit/EarnCreditActivity$GridViewHolder;->d:Z
|
|
|
|
:cond_4
|
|
return-object p2
|
|
.end method
|