PickerBottomLayout.smali

.class public Lim/tpelyyftgw/ui/components/PickerBottomLayout;
.super Landroid/widget/FrameLayout;
.source "PickerBottomLayout.java"


# instance fields
.field public cancelButton:Landroid/widget/TextView;

.field public doneButton:Landroid/widget/LinearLayout;

.field public doneButtonBadgeTextView:Landroid/widget/TextView;

.field public doneButtonTextView:Landroid/widget/TextView;


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

    return-void
.end method

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

    .line 27
    const/4 v0, 0x1

    invoke-direct {p0, p1, v0}, Lim/tpelyyftgw/ui/components/PickerBottomLayout;-><init>(Landroid/content/Context;Z)V

    .line 28
    return-void
.end method

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

    .line 31
    move-object/from16 v0, p0

    move-object/from16 v1, p1

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

    .line 33
    if-eqz p2, :cond_c

    const-string v2, "dialogBackground"

    goto :goto_e

    :cond_c
    const-string v2, "windowBackgroundWhite"

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

    move-result v2

    invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->setBackgroundColor(I)V

    .line 35
    new-instance v2, Landroid/widget/TextView;

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

    iput-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    .line 36
    const/high16 v3, 0x41600000    # 14.0f

    const/4 v4, 0x1

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

    .line 37
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    const-string v5, "picker_enabledButton"

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

    move-result v6

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

    .line 38
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    const/16 v6, 0x11

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

    .line 39
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    const/high16 v7, 0xf000000

    const/4 v8, 0x0

    invoke-static {v7, v8}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(II)Landroid/graphics/drawable/Drawable;

    move-result-object v9

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

    .line 40
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    const/high16 v9, 0x41e80000    # 29.0f

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

    move-result v10

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

    move-result v11

    invoke-virtual {v2, v10, v8, v11, v8}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 41
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    const v10, 0x7f0f02f7

    const-string v11, "Cancel"

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

    move-result-object v10

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

    move-result-object v10

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

    .line 42
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

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

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

    move-result-object v11

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

    .line 43
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->cancelButton:Landroid/widget/TextView;

    const/16 v11, 0x33

    const/4 v12, -0x1

    const/4 v13, -0x2

    invoke-static {v13, v12, v11}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v11

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

    .line 45
    new-instance v2, Landroid/widget/LinearLayout;

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

    iput-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    .line 46
    invoke-virtual {v2, v8}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 47
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    invoke-static {v7, v8}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSelectorDrawable(II)Landroid/graphics/drawable/Drawable;

    move-result-object v7

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

    .line 48
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

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

    move-result v7

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

    move-result v9

    invoke-virtual {v2, v7, v8, v9, v8}, Landroid/widget/LinearLayout;->setPadding(IIII)V

    .line 49
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    const/16 v7, 0x35

    invoke-static {v13, v12, v7}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v7

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

    .line 51
    new-instance v2, Landroid/widget/TextView;

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

    iput-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

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

    move-result-object v7

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

    .line 53
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const/high16 v7, 0x41500000    # 13.0f

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

    .line 54
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const-string v7, "picker_badgeText"

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

    move-result v7

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

    .line 55
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

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

    .line 56
    const/high16 v2, 0x41300000    # 11.0f

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

    move-result v2

    int-to-float v2, v2

    const-string v7, "picker_badge"

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

    move-result v7

    invoke-static {v2, v7}, Lim/tpelyyftgw/ui/actionbar/Theme;->createRoundRectDrawable(FI)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    .line 57
    .local v2, "drawable":Landroid/graphics/drawable/Drawable;
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

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

    .line 58
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const/high16 v9, 0x41b80000    # 23.0f

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

    move-result v9

    invoke-virtual {v7, v9}, Landroid/widget/TextView;->setMinWidth(I)V

    .line 59
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const/high16 v9, 0x41000000    # 8.0f

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

    move-result v11

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

    move-result v12

    const/high16 v14, 0x3f800000    # 1.0f

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

    move-result v14

    invoke-virtual {v7, v11, v8, v12, v14}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 60
    iget-object v7, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    iget-object v8, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const/4 v14, -0x2

    const/16 v15, 0x17

    const/16 v16, 0x10

    const/16 v17, 0x0

    const/16 v18, 0x0

    const/16 v19, 0xa

    const/16 v20, 0x0

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

    move-result-object v11

    invoke-virtual {v7, v8, v11}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 62
    new-instance v7, Landroid/widget/TextView;

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

    iput-object v7, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

    .line 63
    invoke-virtual {v7, v4, v3}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 64
    iget-object v3, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    move-result v4

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

    .line 65
    iget-object v3, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    .line 66
    iget-object v3, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    move-result v4

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

    .line 67
    iget-object v3, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

    const v4, 0x7f0f0f15

    const-string v5, "Send"

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

    move-result-object v4

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

    move-result-object v4

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

    .line 68
    iget-object v3, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    move-result-object v4

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

    .line 69
    iget-object v3, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    iget-object v4, v0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

    const/16 v5, 0x10

    invoke-static {v13, v13, v5}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(III)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 70
    return-void
.end method


# virtual methods
.method public updateSelectedCount(IZ)V
    .registers 9
    .param p1, "count"    # I
    .param p2, "disable"    # Z

    .line 73
    const/4 v0, 0x0

    const-string v1, "picker_enabledButton"

    if-nez p1, :cond_33

    .line 74
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const/16 v3, 0x8

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

    .line 76
    if-eqz p2, :cond_24

    .line 77
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

    const-string v2, "picker_disabledButton"

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

    .line 78
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

    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 79
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->setEnabled(Z)V

    goto :goto_61

    .line 81
    :cond_24
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    .line 82
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    move-result v1

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

    goto :goto_61

    .line 85
    :cond_33
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

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

    .line 86
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonBadgeTextView:Landroid/widget/TextView;

    const/4 v3, 0x1

    new-array v4, v3, [Ljava/lang/Object;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v4, v0

    const-string v0, "%d"

    invoke-static {v0, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

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

    .line 88
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    .line 89
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButtonTextView:Landroid/widget/TextView;

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

    move-result v1

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

    .line 90
    if-eqz p2, :cond_61

    .line 91
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PickerBottomLayout;->doneButton:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v3}, Landroid/widget/LinearLayout;->setEnabled(Z)V

    .line 94
    :cond_61
    :goto_61
    return-void
.end method