PhotoGalleryGridFragment$PhotoGalleryGridAdapter.smali
.class Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
.source "PhotoGalleryGridFragment.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x2
name = "PhotoGalleryGridAdapter"
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
"Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;",
">;"
}
.end annotation
# instance fields
.field private mFilteredFileList:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ltr/com/hurriyet/androidsdk/response/content/Files;",
">;"
}
.end annotation
.end field
.field final synthetic this$0:Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;
# direct methods
.method constructor <init>(Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;)V
.registers 5
.line 104
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V
.line 105
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
.line 106
# getter for: Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;->mContent:Ltr/com/hurriyet/androidsdk/model/content/Content;
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;->access$000(Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment;)Ltr/com/hurriyet/androidsdk/model/content/Content;
move-result-object p1
iget-object p1, p1, Ltr/com/hurriyet/androidsdk/model/content/Content;->files:Ljava/util/ArrayList;
invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_16
:goto_16
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_3e
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ltr/com/hurriyet/androidsdk/response/content/Files;
.line 107
invoke-virtual {v0}, Ltr/com/hurriyet/androidsdk/response/content/Files;->getContentType()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_38
invoke-virtual {v0}, Ltr/com/hurriyet/androidsdk/response/content/Files;->getContentType()Ljava/lang/String;
move-result-object v1
const-string v2, "AdNews"
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_16
.line 108
:cond_38
iget-object v1, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_16
:cond_3e
return-void
.end method
# virtual methods
.method public getItemCount()I
.registers 2
.line 115
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
if-nez v0, :cond_6
const/4 v0, 0x0
goto :goto_a
:cond_6
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
:goto_a
return v0
.end method
.method public bridge synthetic onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
.registers 3
.line 100
check-cast p1, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;
invoke-virtual {p0, p1, p2}, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->onBindViewHolder(Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;I)V
return-void
.end method
.method public onBindViewHolder(Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;I)V
.registers 5
.line 126
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_f
.line 127
invoke-static {p2}, Lhurriyet/mobil/android/hurriyet/utils/SharedElementTransitionHelper;->getGallerySharedElementTransitionName(I)Ljava/lang/String;
move-result-object v0
.line 128
iget-object v1, p1, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;->photo:Landroid/widget/ImageView;
invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setTransitionName(Ljava/lang/String;)V
.line 131
:cond_f
iget-object v0, p1, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;->itemView:Landroid/view/View;
new-instance v1, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$1;
invoke-direct {v1, p0, p1}, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$1;-><init>(Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;)V
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 145
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ltr/com/hurriyet/androidsdk/response/content/Files;
invoke-virtual {v0}, Ltr/com/hurriyet/androidsdk/response/content/Files;->getPhoto()Ltr/com/hurriyet/androidsdk/response/content/Photo;
move-result-object v0
if-eqz v0, :cond_4d
.line 147
iget-object p1, p1, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;->photo:Landroid/widget/ImageView;
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
.line 148
invoke-interface {v0, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ltr/com/hurriyet/androidsdk/response/content/Files;
invoke-virtual {v0}, Ltr/com/hurriyet/androidsdk/response/content/Files;->getPhoto()Ltr/com/hurriyet/androidsdk/response/content/Photo;
move-result-object v0
invoke-virtual {v0}, Ltr/com/hurriyet/androidsdk/response/content/Photo;->getPrefix()Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
.line 149
invoke-interface {v1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object p2
check-cast p2, Ltr/com/hurriyet/androidsdk/response/content/Files;
invoke-virtual {p2}, Ltr/com/hurriyet/androidsdk/response/content/Files;->getPhoto()Ltr/com/hurriyet/androidsdk/response/content/Photo;
move-result-object p2
invoke-virtual {p2}, Ltr/com/hurriyet/androidsdk/response/content/Photo;->getSuffix()Ljava/lang/String;
move-result-object p2
.line 147
invoke-static {p1, v0, p2}, Lhurriyet/mobil/android/hurriyet/utils/ImageLoader;->imageLoader(Landroid/widget/ImageView;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_71
.line 152
:cond_4d
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getPicasso()Lcom/squareup/picasso/Picasso;
move-result-object v0
.line 153
iget-object v1, p0, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->mFilteredFileList:Ljava/util/List;
invoke-interface {v1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object p2
check-cast p2, Ltr/com/hurriyet/androidsdk/response/content/Files;
invoke-virtual {p2}, Ltr/com/hurriyet/androidsdk/response/content/Files;->getFileName()Ljava/lang/String;
move-result-object p2
invoke-virtual {v0, p2}, Lcom/squareup/picasso/Picasso;->load(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;
move-result-object p2
const v0, 0x7f0801ac
.line 154
invoke-virtual {p2, v0}, Lcom/squareup/picasso/RequestCreator;->placeholder(I)Lcom/squareup/picasso/RequestCreator;
move-result-object p2
.line 155
invoke-virtual {p2, v0}, Lcom/squareup/picasso/RequestCreator;->error(I)Lcom/squareup/picasso/RequestCreator;
move-result-object p2
iget-object p1, p1, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;->photo:Landroid/widget/ImageView;
.line 156
invoke-virtual {p2, p1}, Lcom/squareup/picasso/RequestCreator;->into(Landroid/widget/ImageView;)V
:goto_71
return-void
.end method
.method public bridge synthetic onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.registers 3
.line 100
invoke-virtual {p0, p1, p2}, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;
move-result-object p1
return-object p1
.end method
.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;
.registers 6
.line 120
new-instance p2, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()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, 0x7f0c0099
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, p0, p1}, Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter$PhotoViewHolder;-><init>(Lhurriyet/mobil/android/hurriyet/fragments/PhotoGalleryGridFragment$PhotoGalleryGridAdapter;Landroid/view/View;)V
return-object p2
.end method