EditNameGridViewAdapter.smali
.class public Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;
.super Landroid/widget/BaseAdapter;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;
}
.end annotation
# instance fields
.field private allNickName:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private final context:Landroid/content/Context;
.field private curSelectedPos:I
.field private isShowAll:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V
const/4 v0, -0x1
iput v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->curSelectedPos:I
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->isShowAll:Z
iput-object p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->context:Landroid/content/Context;
return-void
.end method
# virtual methods
.method public getCount()I
.registers 3
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->allNickName:Ljava/util/List;
if-nez v0, :cond_a
const/4 v0, 0x0
:goto_5
iget-boolean v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->isShowAll:Z
if-eqz v1, :cond_11
:goto_9
return v0
:cond_a
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->allNickName:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
goto :goto_5
:cond_11
const/16 v1, 0xc
invoke-static {v1, v0}, Ljava/lang/Math;->min(II)I
move-result v0
goto :goto_9
.end method
.method public getCurSelectedItem()Ljava/lang/String;
.registers 3
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->allNickName:Ljava/util/List;
iget v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->curSelectedPos:I
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
return-object v0
.end method
.method public getCurSelectedPos()I
.registers 2
iget v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->curSelectedPos:I
return v0
.end method
.method public getItem(I)Ljava/lang/Object;
.registers 3
const/4 v0, 0x0
return-object v0
.end method
.method public getItemId(I)J
.registers 4
const-wide/16 v0, 0x0
return-wide v0
.end method
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
.registers 8
const/4 v2, 0x0
if-nez p2, :cond_40
new-instance v1, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;
const/4 v0, 0x0
invoke-direct {v1, v0}, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$1;)V
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->context:Landroid/content/Context;
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
sget v3, Lcom/cmcm/xiaobao/phone/smarthome/R$layout;->sh_sdk_midea_edit_nick_name:I
invoke-virtual {v0, v3, p3, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p2
sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->edit_nickname_text:I
invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
# setter for: Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;->textView:Landroid/widget/TextView;
invoke-static {v1, v0}, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;->access$102(Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;Landroid/widget/TextView;)Landroid/widget/TextView;
invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V
move-object v0, v1
:goto_24
# getter for: Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;->textView:Landroid/widget/TextView;
invoke-static {v0}, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;->access$100(Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;)Landroid/widget/TextView;
move-result-object v3
iget v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->curSelectedPos:I
if-ne v1, p1, :cond_47
const/4 v1, 0x1
:goto_2d
invoke-virtual {v3, v1}, Landroid/widget/TextView;->setSelected(Z)V
# getter for: Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;->textView:Landroid/widget/TextView;
invoke-static {v0}, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;->access$100(Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;)Landroid/widget/TextView;
move-result-object v1
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->allNickName:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/CharSequence;
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
return-object p2
:cond_40
invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter$ViewHolder;
goto :goto_24
:cond_47
move v1, v2
goto :goto_2d
.end method
.method public isShowAll()Z
.registers 2
iget-boolean v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->isShowAll:Z
return v0
.end method
.method public setAllNickName(Ljava/util/List;)V
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;)V"
}
.end annotation
iput-object p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->allNickName:Ljava/util/List;
return-void
.end method
.method public setCurSelectedPos(I)V
.registers 2
iput p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->curSelectedPos:I
invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->notifyDataSetChanged()V
return-void
.end method
.method public setShowAll(Z)V
.registers 2
iput-boolean p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->isShowAll:Z
invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/EditNameGridViewAdapter;->notifyDataSetChanged()V
return-void
.end method