EmoticonAdapter.smali

.class public final Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter$a;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroidx/recyclerview/widget/RecyclerView$Adapter<",
        "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
        ">;"
    }
.end annotation


# instance fields
.field private final a:[I

.field private final b:F

.field private final c:Landroid/view/View$OnClickListener;

.field private final d:I


# direct methods
.method public constructor <init>(Landroid/view/View$OnClickListener;I)V
    .registers 4

    const-string v0, "mOnItemClickListener"

    invoke-static {p1, v0}, Lkotlin/f/b/o;->b(Ljava/lang/Object;Ljava/lang/String;)V

    .line 17
    invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V

    iput-object p1, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->c:Landroid/view/View$OnClickListener;

    iput p2, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->d:I

    .line 19
    sget p1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 p2, 0x13

    if-ge p1, p2, :cond_16

    const/4 p1, 0x0

    new-array p1, p1, [I

    goto :goto_1d

    :cond_16
    const/16 p1, 0x41

    new-array p1, p1, [I

    .line 22
    fill-array-data p1, :array_2e

    .line 19
    :goto_1d
    iput-object p1, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->a:[I

    const/4 p1, 0x1

    .line 26
    invoke-virtual {p0, p1}, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->setHasStableIds(Z)V

    .line 27
    iget p1, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->d:I

    int-to-float p1, p1

    const p2, 0x3f266666    # 0.65f

    mul-float p1, p1, p2

    iput p1, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->b:F

    return-void

    :array_2e
    .array-data 4
        0x1f603
        0x1f602
        0x2764
        0x1f601
        0x1f60d
        0x1f618
        0x1f62d
        0x1f60a
        0x1f604
        0x1f339
        0x1f605
        0x1f606
        0x1f609
        0x1f497
        0x1f60b
        0x1f60c
        0x1f48b
        0x1f44d
        0x1f44c
        0x1f44f
        0x1f60f
        0x1f612
        0x1f613
        0x1f614
        0x1f616
        0x1f61a
        0x1f61c
        0x1f61d
        0x1f61e
        0x1f620
        0x1f621
        0x1f622
        0x1f623
        0x1f624
        0x1f625
        0x1f628
        0x1f629
        0x1f62a
        0x1f62b
        0x1f630
        0x1f631
        0x1f632
        0x1f633
        0x1f635
        0x1f637
        0x1f638
        0x1f639
        0x1f63a
        0x1f63b
        0x1f63c
        0x1f63d
        0x1f63e
        0x1f63f
        0x1f640
        0x1f645
        0x1f646
        0x1f647
        0x1f648
        0x1f649
        0x1f64a
        0x1f64b
        0x1f64c
        0x1f64d
        0x1f64e
        0x1f64f
    .end array-data
.end method


# virtual methods
.method public final getItemCount()I
    .registers 2

    .line 31
    iget-object v0, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->a:[I

    array-length v0, v0

    return v0
.end method

.method public final getItemId(I)J
    .registers 4

    .line 35
    iget-object v0, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->a:[I

    aget p1, v0, p1

    int-to-long v0, p1

    return-wide v0
.end method

.method public final onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
    .registers 4

    const-string v0, "holder"

    invoke-static {p1, v0}, Lkotlin/f/b/o;->b(Ljava/lang/Object;Ljava/lang/String;)V

    .line 56
    check-cast p1, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter$a;

    iget-object v0, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->a:[I

    aget p2, v0, p2

    .line 1062
    iget-object p1, p1, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter$a;->itemView:Landroid/view/View;

    if-eqz p1, :cond_25

    check-cast p1, Landroid/widget/TextView;

    invoke-static {p2}, Ljava/lang/Character;->toChars(I)[C

    move-result-object p2

    const-string v0, "Character.toChars(unicode)"

    invoke-static {p2, v0}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V

    new-instance v0, Ljava/lang/String;

    invoke-direct {v0, p2}, Ljava/lang/String;-><init>([C)V

    check-cast v0, Ljava/lang/CharSequence;

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void

    :cond_25
    new-instance p1, Lkotlin/TypeCastException;

    const-string p2, "null cannot be cast to non-null type android.widget.TextView"

    invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public final onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .registers 5

    const-string p2, "parent"

    invoke-static {p1, p2}, Lkotlin/f/b/o;->b(Ljava/lang/Object;Ljava/lang/String;)V

    .line 39
    invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object p2

    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const/4 v0, 0x0

    const v1, 0x1090003

    invoke-virtual {p2, v1, p1, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    if-eqz p1, :cond_58

    check-cast p1, Landroid/widget/TextView;

    .line 40
    invoke-virtual {p1}, Landroid/widget/TextView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object p2

    const/4 v1, -0x1

    .line 41
    iput v1, p2, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 42
    iget v1, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->d:I

    iput v1, p2, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 43
    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    const/16 p2, 0x11

    .line 44
    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setGravity(I)V

    .line 45
    invoke-virtual {p1, v0, v0, v0, v0}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 46
    sget p2, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x10

    if-lt p2, v1, :cond_38

    .line 47
    invoke-virtual {p1, v0, v0, v0, v0}, Landroid/widget/TextView;->setPaddingRelative(IIII)V

    .line 48
    :cond_38
    iget p2, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->b:F

    invoke-virtual {p1, v0, p2}, Landroid/widget/TextView;->setTextSize(IF)V

    const/high16 p2, -0x1000000

    .line 49
    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 50
    iget-object p2, p0, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter;->c:Landroid/view/View$OnClickListener;

    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 51
    invoke-static {}, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/b;->a()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 52
    new-instance p2, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter$a;

    check-cast p1, Landroid/view/View;

    invoke-direct {p2, p1}, Lcom/imo/android/imoim/feeds/ui/detail/components/comment/emoticon/EmoticonAdapter$a;-><init>(Landroid/view/View;)V

    check-cast p2, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;

    return-object p2

    .line 39
    :cond_58
    new-instance p1, Lkotlin/TypeCastException;

    const-string p2, "null cannot be cast to non-null type android.widget.TextView"

    invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V

    throw p1
.end method