308 lines
7.1 KiB
Smali
308 lines
7.1 KiB
Smali
.class public Lcom/zhpan/bannerview/BaseViewHolder;
|
|
.super Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
|
|
.source "BaseViewHolder.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Landroidx/recyclerview/widget/RecyclerView$ViewHolder;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final mViews:Landroid/util/SparseArray;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroid/util/SparseArray<",
|
|
"Landroid/view/View;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
.line 49
|
|
invoke-direct {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;-><init>(Landroid/view/View;)V
|
|
|
|
.line 46
|
|
new-instance p1, Landroid/util/SparseArray;
|
|
|
|
invoke-direct {p1}, Landroid/util/SparseArray;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/zhpan/bannerview/BaseViewHolder;->mViews:Landroid/util/SparseArray;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bindData(Ljava/lang/Object;II)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;II)V"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public findViewById(I)Landroid/view/View;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<V:",
|
|
"Landroid/view/View;",
|
|
">(I)TV;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 61
|
|
iget-object v0, p0, Lcom/zhpan/bannerview/BaseViewHolder;->mViews:Landroid/util/SparseArray;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 63
|
|
iget-object v0, p0, Lcom/zhpan/bannerview/BaseViewHolder;->itemView:Landroid/view/View;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
.line 64
|
|
iget-object v1, p0, Lcom/zhpan/bannerview/BaseViewHolder;->mViews:Landroid/util/SparseArray;
|
|
|
|
invoke-virtual {v1, p1, v0}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public setBackgroundColor(II)V
|
|
.locals 0
|
|
|
|
.line 106
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setBackgroundColor(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setBackgroundResource(II)V
|
|
.locals 0
|
|
|
|
.line 102
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setBackgroundResource(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setImageBitmap(ILandroid/graphics/Bitmap;)V
|
|
.locals 0
|
|
|
|
.line 124
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
.line 125
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setImageDrawable(ILandroid/graphics/drawable/Drawable;)V
|
|
.locals 1
|
|
|
|
.line 117
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 118
|
|
instance-of v0, p1, Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 119
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setImageResource(II)V
|
|
.locals 1
|
|
|
|
.line 110
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 111
|
|
instance-of v0, p1, Landroid/widget/ImageView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 112
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnClickListener(ILandroid/view/View$OnClickListener;)V
|
|
.locals 0
|
|
|
|
.line 98
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setText(II)V
|
|
.locals 1
|
|
|
|
.line 77
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 78
|
|
instance-of v0, p1, Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 79
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setText(ILjava/lang/CharSequence;)V
|
|
.locals 1
|
|
|
|
.line 70
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 71
|
|
instance-of v0, p1, Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 72
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextColor(II)V
|
|
.locals 1
|
|
|
|
.line 84
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 85
|
|
instance-of v0, p1, Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 86
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTextColorRes(II)V
|
|
.locals 1
|
|
|
|
.line 91
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
.line 92
|
|
instance-of v0, p1, Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 93
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iget-object v0, p0, Lcom/zhpan/bannerview/BaseViewHolder;->itemView:Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p2}, Landroidx/core/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setVisibility(II)V
|
|
.locals 0
|
|
|
|
.line 129
|
|
invoke-virtual {p0, p1}, Lcom/zhpan/bannerview/BaseViewHolder;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
.end method
|