ManageChatTextCell.smali
.class public Lim/tpelyyftgw/ui/cells/ManageChatTextCell;
.super Landroid/widget/FrameLayout;
.source "ManageChatTextCell.java"
# instance fields
.field private divider:Z
.field private imageView:Landroid/widget/ImageView;
.field private textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
.field private valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 7
.param p1, "context" # Landroid/content/Context;
.line 24
invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
.line 26
new-instance v0, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
.line 27
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/actionbar/SimpleTextView;->setTextColor(I)V
.line 28
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
const/16 v1, 0x10
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextSize(I)V
.line 29
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
sget-boolean v2, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z
const/4 v3, 0x5
const/4 v4, 0x3
if-eqz v2, :cond_25
const/4 v2, 0x5
goto :goto_26
:cond_25
const/4 v2, 0x3
:goto_26
invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setGravity(I)V
.line 30
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->addView(Landroid/view/View;)V
.line 32
new-instance v0, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
.line 33
const-string/jumbo v2, "windowBackgroundWhiteValueText"
invoke-static {v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I
move-result v2
invoke-virtual {v0, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V
.line 34
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextSize(I)V
.line 35
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z
if-eqz v1, :cond_4b
const/4 v3, 0x3
:cond_4b
invoke-virtual {v0, v3}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setGravity(I)V
.line 36
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->addView(Landroid/view/View;)V
.line 38
new-instance v0, Landroid/widget/ImageView;
invoke-direct {v0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
.line 39
sget-object v1, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
.line 40
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
new-instance v1, Landroid/graphics/PorterDuffColorFilter;
const-string/jumbo v2, "windowBackgroundWhiteGrayIcon"
invoke-static {v2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I
move-result v2
sget-object v3, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;
invoke-direct {v1, v2, v3}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setColorFilter(Landroid/graphics/ColorFilter;)V
.line 41
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->addView(Landroid/view/View;)V
.line 42
return-void
.end method
# virtual methods
.method public getTextView()Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
.registers 2
.line 45
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
return-object v0
.end method
.method public getValueTextView()Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
.registers 2
.line 49
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
return-object v0
.end method
.method protected onDraw(Landroid/graphics/Canvas;)V
.registers 9
.param p1, "canvas" # Landroid/graphics/Canvas;
.line 110
iget-boolean v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->divider:Z
if-eqz v0, :cond_24
.line 111
const/high16 v0, 0x428e0000 # 71.0f
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v0
int-to-float v2, v0
invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->getMeasuredHeight()I
move-result v0
add-int/lit8 v0, v0, -0x1
int-to-float v3, v0
invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->getMeasuredWidth()I
move-result v0
int-to-float v4, v0
invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->getMeasuredHeight()I
move-result v0
add-int/lit8 v0, v0, -0x1
int-to-float v5, v0
sget-object v6, Lim/tpelyyftgw/ui/actionbar/Theme;->dividerPaint:Landroid/graphics/Paint;
move-object v1, p1
invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V
.line 113
:cond_24
return-void
.end method
.method protected onLayout(ZIIII)V
.registers 14
.param p1, "changed" # Z
.param p2, "left" # I
.param p3, "top" # I
.param p4, "right" # I
.param p5, "bottom" # I
.line 66
sub-int v0, p5, p3
.line 67
.local v0, "height":I
sub-int v1, p4, p2
.line 69
.local v1, "width":I
iget-object v2, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->getTextHeight()I
move-result v2
sub-int v2, v0, v2
div-int/lit8 v2, v2, 0x2
.line 70
.local v2, "viewTop":I
sget-boolean v3, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z
const/high16 v4, 0x41c00000 # 24.0f
if-eqz v3, :cond_19
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
goto :goto_1a
:cond_19
const/4 v3, 0x0
.line 71
.local v3, "viewLeft":I
:goto_1a
iget-object v5, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->getMeasuredWidth()I
move-result v6
add-int/2addr v6, v3
iget-object v7, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v7}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->getMeasuredHeight()I
move-result v7
add-int/2addr v7, v2
invoke-virtual {v5, v3, v2, v6, v7}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->layout(IIII)V
.line 73
iget-object v5, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->getTextHeight()I
move-result v5
sub-int v5, v0, v5
div-int/lit8 v5, v5, 0x2
.line 74
.end local v2 # "viewTop":I
.local v5, "viewTop":I
sget-boolean v2, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z
if-nez v2, :cond_40
const/high16 v2, 0x428e0000 # 71.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
goto :goto_44
:cond_40
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
.line 75
.end local v3 # "viewLeft":I
.local v2, "viewLeft":I
:goto_44
iget-object v3, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v3}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->getMeasuredWidth()I
move-result v4
add-int/2addr v4, v2
iget-object v6, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v6}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->getMeasuredHeight()I
move-result v6
add-int/2addr v6, v5
invoke-virtual {v3, v2, v5, v4, v6}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->layout(IIII)V
.line 78
iget-object v3, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {v3}, Landroid/widget/ImageView;->getMeasuredHeight()I
move-result v3
sub-int v3, v0, v3
div-int/lit8 v3, v3, 0x2
.line 79
.end local v5 # "viewTop":I
.local v3, "viewTop":I
sget-boolean v4, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z
const/high16 v5, 0x41a80000 # 21.0f
if-nez v4, :cond_6a
invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
goto :goto_77
:cond_6a
iget-object v4, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {v4}, Landroid/widget/ImageView;->getMeasuredWidth()I
move-result v4
sub-int v4, v1, v4
invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v5
sub-int/2addr v4, v5
:goto_77
move v2, v4
.line 80
iget-object v4, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {v4}, Landroid/widget/ImageView;->getMeasuredWidth()I
move-result v5
add-int/2addr v5, v2
iget-object v6, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {v6}, Landroid/widget/ImageView;->getMeasuredHeight()I
move-result v6
add-int/2addr v6, v3
invoke-virtual {v4, v2, v3, v5, v6}, Landroid/widget/ImageView;->layout(IIII)V
.line 81
return-void
.end method
.method protected onMeasure(II)V
.registers 11
.param p1, "widthMeasureSpec" # I
.param p2, "heightMeasureSpec" # I
.line 54
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v0
.line 55
.local v0, "width":I
const/high16 v1, 0x42400000 # 48.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
.line 57
.local v1, "height":I
iget-object v2, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
const/high16 v3, 0x41c00000 # 24.0f
invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
sub-int v3, v0, v3
const/high16 v4, -0x80000000
invoke-static {v3, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v3
const/high16 v5, 0x41a00000 # 20.0f
invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v6
const/high16 v7, 0x40000000 # 2.0f
invoke-static {v6, v7}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v6
invoke-virtual {v2, v3, v6}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->measure(II)V
.line 58
iget-object v2, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
const/high16 v3, 0x42be0000 # 95.0f
invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
sub-int v3, v0, v3
invoke-static {v3, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v3
invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v5
invoke-static {v5, v7}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v5
invoke-virtual {v2, v3, v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->measure(II)V
.line 59
iget-object v2, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-static {v0, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v3
invoke-static {v1, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v4
invoke-virtual {v2, v3, v4}, Landroid/widget/ImageView;->measure(II)V
.line 61
const/high16 v2, 0x42600000 # 56.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
iget-boolean v3, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->divider:Z
add-int/2addr v2, v3
invoke-virtual {p0, v0, v2}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->setMeasuredDimension(II)V
.line 62
return-void
.end method
.method public setColors(Ljava/lang/String;Ljava/lang/String;)V
.registers 7
.param p1, "icon" # Ljava/lang/String;
.param p2, "text" # Ljava/lang/String;
.line 88
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-static {p2}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I
move-result v1
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V
.line 89
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v0, p2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTag(Ljava/lang/Object;)V
.line 90
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
new-instance v1, Landroid/graphics/PorterDuffColorFilter;
invoke-static {p1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I
move-result v2
sget-object v3, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;
invoke-direct {v1, v2, v3}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setColorFilter(Landroid/graphics/ColorFilter;)V
.line 91
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V
.line 92
return-void
.end method
.method public setText(Ljava/lang/String;Ljava/lang/String;IZ)V
.registers 7
.param p1, "text" # Ljava/lang/String;
.param p2, "value" # Ljava/lang/String;
.param p3, "resId" # I
.param p4, "needDivider" # Z
.line 95
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z
.line 96
if-eqz p2, :cond_13
.line 97
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v0, p2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z
.line 98
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setVisibility(I)V
goto :goto_19
.line 100
:cond_13
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->valueTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
const/4 v1, 0x4
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setVisibility(I)V
.line 103
:goto_19
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->imageView:Landroid/widget/ImageView;
invoke-virtual {v0, p3}, Landroid/widget/ImageView;->setImageResource(I)V
.line 104
iput-boolean p4, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->divider:Z
.line 105
xor-int/lit8 v0, p4, 0x1
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->setWillNotDraw(Z)V
.line 106
return-void
.end method
.method public setTextColor(I)V
.registers 3
.param p1, "color" # I
.line 84
iget-object v0, p0, Lim/tpelyyftgw/ui/cells/ManageChatTextCell;->textView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;
invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V
.line 85
return-void
.end method