StickerSetGroupInfoCell.smali

.class public Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;
.super Landroid/widget/LinearLayout;
.source "StickerSetGroupInfoCell.java"


# instance fields
.field private addButton:Landroid/widget/TextView;

.field private isLast:Z


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 13
    .param p1, "context"    # Landroid/content/Context;

    .line 22
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 23
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->setOrientation(I)V

    .line 25
    new-instance v1, Landroid/widget/TextView;

    invoke-direct {v1, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 26
    .local v1, "infoTextView":Landroid/widget/TextView;
    const-string v2, "chat_emojiPanelTrendingDescription"

    invoke-static {v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setTextColor(I)V

    .line 27
    const/high16 v2, 0x41600000    # 14.0f

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

    .line 28
    const-string v3, "GroupStickersInfo"

    const v4, 0x7f0f0742

    invoke-static {v3, v4}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v3

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

    .line 29
    const/4 v4, -0x1

    const/4 v5, -0x2

    const/16 v6, 0x33

    const/16 v7, 0x11

    const/4 v8, 0x4

    const/16 v9, 0x11

    const/4 v10, 0x0

    invoke-static/range {v4 .. v10}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(IIIIIII)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v3

    invoke-virtual {p0, v1, v3}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 31
    new-instance v3, Landroid/widget/TextView;

    invoke-direct {v3, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    .line 32
    const/high16 v4, 0x41880000    # 17.0f

    invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v4

    const/4 v6, 0x0

    invoke-virtual {v3, v5, v6, v4, v6}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 33
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    const/16 v4, 0x11

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setGravity(I)V

    .line 34
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    const-string v4, "featuredStickers_buttonText"

    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 35
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

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

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    const-string v2, "fonts/rmedium.ttf"

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->getTypeface(Ljava/lang/String;)Landroid/graphics/Typeface;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 37
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    const/high16 v2, 0x40800000    # 4.0f

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    int-to-float v2, v2

    const-string v3, "featuredStickers_addButton"

    invoke-static {v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v3

    const-string v4, "featuredStickers_addButtonPressed"

    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    invoke-static {v2, v3, v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSimpleSelectorRoundRectDrawable(FII)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 38
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    const-string v2, "ChooseStickerSet"

    const v3, 0x7f0f040b

    invoke-static {v2, v3}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v2

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

    .line 39
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

    const/4 v2, -0x2

    const/16 v3, 0x1c

    const/16 v4, 0x33

    const/16 v5, 0x11

    const/16 v6, 0xa

    const/16 v7, 0xe

    const/16 v8, 0x8

    invoke-static/range {v2 .. v8}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(IIIIIII)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v2

    invoke-virtual {p0, v0, v2}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 40
    return-void
.end method


# virtual methods
.method protected onMeasure(II)V
    .registers 6
    .param p1, "widthMeasureSpec"    # I
    .param p2, "heightMeasureSpec"    # I

    .line 44
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    const/high16 v1, 0x40000000    # 2.0f

    invoke-static {v0, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    invoke-super {p0, v0, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V

    .line 45
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->isLast:Z

    if-eqz v0, :cond_3b

    .line 46
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/view/View;

    .line 47
    .local v0, "parent":Landroid/view/View;
    if-eqz v0, :cond_3b

    .line 48
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v1

    invoke-virtual {v0}, Landroid/view/View;->getPaddingBottom()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {v0}, Landroid/view/View;->getPaddingTop()I

    move-result v2

    sub-int/2addr v1, v2

    const/high16 v2, 0x41c00000    # 24.0f

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    sub-int/2addr v1, v2

    .line 49
    .local v1, "height":I
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->getMeasuredHeight()I

    move-result v2

    if-ge v2, v1, :cond_3b

    .line 50
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->getMeasuredWidth()I

    move-result v2

    invoke-virtual {p0, v2, v1}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->setMeasuredDimension(II)V

    .line 54
    .end local v0    # "parent":Landroid/view/View;
    .end local v1    # "height":I
    :cond_3b
    return-void
.end method

.method public setAddOnClickListener(Landroid/view/View$OnClickListener;)V
    .registers 3
    .param p1, "onClickListener"    # Landroid/view/View$OnClickListener;

    .line 57
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->addButton:Landroid/widget/TextView;

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

    .line 58
    return-void
.end method

.method public setIsLast(Z)V
    .registers 2
    .param p1, "last"    # Z

    .line 61
    iput-boolean p1, p0, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->isLast:Z

    .line 62
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/StickerSetGroupInfoCell;->requestLayout()V

    .line 63
    return-void
.end method