HurriyetNotificationsViewAdapter.smali
.class Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
.source "HurriyetNotificationsViewAdapter.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
"Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
">;"
}
.end annotation
# instance fields
.field private dataList:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;",
">;"
}
.end annotation
.end field
.field private final itemClickListener:Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;
# direct methods
.method public constructor <init>(Ljava/util/List;Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;",
">;",
"Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;",
")V"
}
.end annotation
.line 22
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V
.line 23
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;->dataList:Ljava/util/List;
.line 24
iput-object p2, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;->itemClickListener:Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;
return-void
.end method
# virtual methods
.method public getItemCount()I
.registers 2
.line 42
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;->dataList:Ljava/util/List;
if-nez v0, :cond_6
const/4 v0, 0x0
return v0
.line 45
:cond_6
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
return v0
.end method
.method public getItemViewType(I)I
.registers 2
return p1
.end method
.method public onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
.registers 5
.line 34
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;->dataList:Ljava/util/List;
if-eqz v0, :cond_1a
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
if-lt p2, v0, :cond_b
goto :goto_1a
.line 37
:cond_b
check-cast p1, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;->dataList:Ljava/util/List;
invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;
iget-object v1, p0, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewAdapter;->itemClickListener:Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;
invoke-virtual {p1, p2, v0, v1}, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;->setData(ILhurriyet/mobil/android/hurriyet/views/notificationsview/NotificationModel;Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewListener;)V
:cond_1a
:goto_1a
return-void
.end method
.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.registers 6
.line 29
new-instance p2, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getAppContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
const v1, 0x7f0c009a
const/4 v2, 0x0
invoke-virtual {v0, v1, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p1
invoke-direct {p2, p1}, Lhurriyet/mobil/android/hurriyet/views/notificationsview/HurriyetNotificationsViewHolder;-><init>(Landroid/view/View;)V
return-object p2
.end method