EditTextSettingsCell.smali

.class public Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;
.super Landroid/widget/FrameLayout;
.source "EditTextSettingsCell.java"


# instance fields
.field private needDivider:Z

.field private textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;


# 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 29
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 31
    new-instance v0, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    .line 32
    const-string/jumbo v1, "windowBackgroundWhiteBlackText"

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

    move-result v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setTextColor(I)V

    .line 33
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    const-string/jumbo v1, "windowBackgroundWhiteHintText"

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

    move-result v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setHintTextColor(I)V

    .line 34
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    const/4 v1, 0x1

    const/high16 v2, 0x41600000    # 14.0f

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setTextSize(IF)V

    .line 35
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setLines(I)V

    .line 36
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setMaxLines(I)V

    .line 37
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setSingleLine(Z)V

    .line 38
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    sget-object v1, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 39
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/4 v2, 0x5

    const/4 v3, 0x3

    if-eqz v1, :cond_48

    const/4 v1, 0x5

    goto :goto_49

    :cond_48
    const/4 v1, 0x3

    :goto_49
    or-int/lit8 v1, v1, 0x10

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setGravity(I)V

    .line 40
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 41
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    const/4 v1, 0x0

    invoke-virtual {v0, v1, v1, v1, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setPadding(IIII)V

    .line 42
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->getInputType()I

    move-result v1

    or-int/lit16 v1, v1, 0x4000

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setInputType(I)V

    .line 43
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    const/high16 v4, -0x40800000    # -1.0f

    const/high16 v5, -0x40800000    # -1.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_70

    goto :goto_71

    :cond_70
    const/4 v2, 0x3

    :goto_71
    or-int/lit8 v6, v2, 0x30

    const/high16 v7, 0x41a80000    # 21.0f

    const/4 v8, 0x0

    const/high16 v9, 0x41a80000    # 21.0f

    const/4 v10, 0x0

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

    move-result-object v1

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

    .line 44
    return-void
.end method


# virtual methods
.method public addTextWatcher(Landroid/text/TextWatcher;)V
    .registers 3
    .param p1, "watcher"    # Landroid/text/TextWatcher;

    .line 59
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->addTextChangedListener(Landroid/text/TextWatcher;)V

    .line 60
    return-void
.end method

.method public getText()Ljava/lang/String;
    .registers 2

    .line 63
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getTextView()Lim/tpelyyftgw/ui/components/EditTextBoldCursor;
    .registers 2

    .line 55
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    return-object v0
.end method

.method public length()I
    .registers 2

    .line 67
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->length()I

    move-result v0

    return v0
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .registers 10
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .line 93
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->needDivider:Z

    if-eqz v0, :cond_37

    .line 94
    sget-boolean v0, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/high16 v1, 0x41a00000    # 20.0f

    if-eqz v0, :cond_d

    const/4 v0, 0x0

    const/4 v3, 0x0

    goto :goto_13

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

    move-result v0

    int-to-float v0, v0

    move v3, v0

    :goto_13
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->getMeasuredHeight()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    int-to-float v4, v0

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->getMeasuredWidth()I

    move-result v0

    sget-boolean v2, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v2, :cond_27

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

    move-result v1

    goto :goto_28

    :cond_27
    const/4 v1, 0x0

    :goto_28
    sub-int/2addr v0, v1

    int-to-float v5, v0

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->getMeasuredHeight()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    int-to-float v6, v0

    sget-object v7, Lim/tpelyyftgw/ui/actionbar/Theme;->dividerPaint:Landroid/graphics/Paint;

    move-object v2, p1

    invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 96
    :cond_37
    return-void
.end method

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

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

    move-result v0

    const/high16 v1, 0x42480000    # 50.0f

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

    move-result v1

    iget-boolean v2, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->needDivider:Z

    add-int/2addr v1, v2

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

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

    move-result v0

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->getPaddingLeft()I

    move-result v1

    sub-int/2addr v0, v1

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->getPaddingRight()I

    move-result v1

    sub-int/2addr v0, v1

    const/high16 v1, 0x42280000    # 42.0f

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

    move-result v1

    sub-int/2addr v0, v1

    .line 51
    .local v0, "availableWidth":I
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    const/high16 v2, 0x40000000    # 2.0f

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

    move-result v3

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->getMeasuredHeight()I

    move-result v4

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

    move-result v2

    invoke-virtual {v1, v3, v2}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->measure(II)V

    .line 52
    return-void
.end method

.method public setEnabled(ZLjava/util/ArrayList;)V
    .registers 3
    .param p1, "value"    # Z
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(Z",
            "Ljava/util/ArrayList<",
            "Landroid/animation/Animator;",
            ">;)V"
        }
    .end annotation

    .line 88
    .local p2, "animators":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/animation/Animator;>;"
    invoke-virtual {p0, p1}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->setEnabled(Z)V

    .line 89
    return-void
.end method

.method public setText(Ljava/lang/String;Z)V
    .registers 4
    .param p1, "text"    # Ljava/lang/String;
    .param p2, "divider"    # Z

    .line 75
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setText(Ljava/lang/CharSequence;)V

    .line 76
    iput-boolean p2, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->needDivider:Z

    .line 77
    xor-int/lit8 v0, p2, 0x1

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->setWillNotDraw(Z)V

    .line 78
    return-void
.end method

.method public setTextAndHint(Ljava/lang/String;Ljava/lang/String;Z)V
    .registers 5
    .param p1, "text"    # Ljava/lang/String;
    .param p2, "hint"    # Ljava/lang/String;
    .param p3, "divider"    # Z

    .line 81
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setText(Ljava/lang/CharSequence;)V

    .line 82
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, p2}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setHint(Ljava/lang/CharSequence;)V

    .line 83
    iput-boolean p3, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->needDivider:Z

    .line 84
    xor-int/lit8 v0, p3, 0x1

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->setWillNotDraw(Z)V

    .line 85
    return-void
.end method

.method public setTextColor(I)V
    .registers 3
    .param p1, "color"    # I

    .line 71
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/EditTextSettingsCell;->textView:Lim/tpelyyftgw/ui/components/EditTextBoldCursor;

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/EditTextBoldCursor;->setTextColor(I)V

    .line 72
    return-void
.end method