ArticleViewer$BlockPullquoteCell.smali
.class Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;
.super Landroid/view/View;
.source "ArticleViewer.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lim/tpelyyftgw/ui/ArticleViewer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x2
name = "BlockPullquoteCell"
.end annotation
# instance fields
.field private currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
.field private parentAdapter:Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;
.field private textLayout:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
.field private textLayout2:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
.field private textX:I
.field private textY:I
.field private textY2:I
.field final synthetic this$0:Lim/tpelyyftgw/ui/ArticleViewer;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Lim/tpelyyftgw/ui/ArticleViewer;Landroid/content/Context;Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;)V
.registers 4
.param p2, "context" # Landroid/content/Context;
.param p3, "adapter" # Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;
.line 9023
iput-object p1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->this$0:Lim/tpelyyftgw/ui/ArticleViewer;
.line 9024
invoke-direct {p0, p2}, Landroid/view/View;-><init>(Landroid/content/Context;)V
.line 9016
const/high16 p1, 0x41900000 # 18.0f
invoke-static {p1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result p1
iput p1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textX:I
.line 9017
const/high16 p1, 0x41000000 # 8.0f
invoke-static {p1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result p1
iput p1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textY:I
.line 9025
iput-object p3, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->parentAdapter:Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;
.line 9026
return-void
.end method
# virtual methods
.method protected onDraw(Landroid/graphics/Canvas;)V
.registers 4
.param p1, "canvas" # Landroid/graphics/Canvas;
.line 9066
iget-object v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
if-nez v0, :cond_5
.line 9067
return-void
.line 9069
:cond_5
iget-object v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
if-eqz v0, :cond_1d
.line 9070
invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
.line 9071
iget v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textX:I
int-to-float v0, v0
iget v1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textY:I
int-to-float v1, v1
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->translate(FF)V
.line 9072
iget-object v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;->draw(Landroid/graphics/Canvas;)V
.line 9073
invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V
.line 9075
:cond_1d
iget-object v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout2:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
if-eqz v0, :cond_35
.line 9076
invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
.line 9077
iget v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textX:I
int-to-float v0, v0
iget v1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textY2:I
int-to-float v1, v1
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->translate(FF)V
.line 9078
iget-object v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout2:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;->draw(Landroid/graphics/Canvas;)V
.line 9079
invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V
.line 9081
:cond_35
return-void
.end method
.method protected onMeasure(II)V
.registers 15
.param p1, "widthMeasureSpec" # I
.param p2, "heightMeasureSpec" # I
.line 9040
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v0
.line 9041
.local v0, "width":I
const/4 v1, 0x0
.line 9043
.local v1, "height":I
iget-object v2, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
if-eqz v2, :cond_68
.line 9044
iget-object v3, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->this$0:Lim/tpelyyftgw/ui/ArticleViewer;
const/4 v5, 0x0
iget-object v6, v2, Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;->text:Lim/tpelyyftgw/tgnet/TLRPC$RichText;
const/high16 v2, 0x42100000 # 36.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sub-int v7, v0, v4
iget-object v8, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
iget-object v9, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->parentAdapter:Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;
move-object v4, p0
invoke-static/range {v3 .. v9}, Lim/tpelyyftgw/ui/ArticleViewer;->access$13600(Lim/tpelyyftgw/ui/ArticleViewer;Landroid/view/View;Ljava/lang/CharSequence;Lim/tpelyyftgw/tgnet/TLRPC$RichText;ILim/tpelyyftgw/tgnet/TLRPC$PageBlock;Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;)Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
move-result-object v3
iput-object v3, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
.line 9045
const/high16 v4, 0x41000000 # 8.0f
if-eqz v3, :cond_31
.line 9046
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
iget-object v5, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
invoke-virtual {v5}, Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;->getHeight()I
move-result v5
add-int/2addr v3, v5
add-int/2addr v1, v3
.line 9048
:cond_31
iget-object v5, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->this$0:Lim/tpelyyftgw/ui/ArticleViewer;
const/4 v7, 0x0
iget-object v3, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
iget-object v8, v3, Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;->caption:Lim/tpelyyftgw/tgnet/TLRPC$RichText;
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
sub-int v9, v0, v2
iget-object v10, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
iget-object v11, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->parentAdapter:Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;
move-object v6, p0
invoke-static/range {v5 .. v11}, Lim/tpelyyftgw/ui/ArticleViewer;->access$13600(Lim/tpelyyftgw/ui/ArticleViewer;Landroid/view/View;Ljava/lang/CharSequence;Lim/tpelyyftgw/tgnet/TLRPC$RichText;ILim/tpelyyftgw/tgnet/TLRPC$PageBlock;Lim/tpelyyftgw/ui/ArticleViewer$WebpageAdapter;)Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
move-result-object v2
iput-object v2, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout2:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
.line 9049
if-eqz v2, :cond_60
.line 9050
const/high16 v2, 0x40000000 # 2.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
add-int/2addr v2, v1
iput v2, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textY2:I
.line 9051
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
iget-object v3, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout2:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
invoke-virtual {v3}, Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;->getHeight()I
move-result v3
add-int/2addr v2, v3
add-int/2addr v1, v2
.line 9053
:cond_60
if-eqz v1, :cond_69
.line 9054
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
add-int/2addr v1, v2
goto :goto_69
.line 9057
:cond_68
const/4 v1, 0x1
.line 9060
:cond_69
:goto_69
invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->setMeasuredDimension(II)V
.line 9061
return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 9
.param p1, "event" # Landroid/view/MotionEvent;
.line 9035
iget-object v0, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->this$0:Lim/tpelyyftgw/ui/ArticleViewer;
iget-object v3, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
iget v4, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textX:I
iget v5, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textY:I
move-object v1, p1
move-object v2, p0
invoke-static/range {v0 .. v5}, Lim/tpelyyftgw/ui/ArticleViewer;->access$8100(Lim/tpelyyftgw/ui/ArticleViewer;Landroid/view/MotionEvent;Landroid/view/View;Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;II)Z
move-result v0
if-nez v0, :cond_29
iget-object v1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->this$0:Lim/tpelyyftgw/ui/ArticleViewer;
iget-object v4, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textLayout2:Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;
iget v5, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textX:I
iget v6, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->textY2:I
move-object v2, p1
move-object v3, p0
invoke-static/range {v1 .. v6}, Lim/tpelyyftgw/ui/ArticleViewer;->access$8100(Lim/tpelyyftgw/ui/ArticleViewer;Landroid/view/MotionEvent;Landroid/view/View;Lim/tpelyyftgw/ui/ArticleViewer$DrawingText;II)Z
move-result v0
if-nez v0, :cond_29
invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_27
goto :goto_29
:cond_27
const/4 v0, 0x0
goto :goto_2a
:cond_29
:goto_29
const/4 v0, 0x1
:goto_2a
return v0
.end method
.method public setBlock(Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;)V
.registers 2
.param p1, "block" # Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
.line 9029
iput-object p1, p0, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->currentBlock:Lim/tpelyyftgw/tgnet/TLRPC$TL_pageBlockPullquote;
.line 9030
invoke-virtual {p0}, Lim/tpelyyftgw/ui/ArticleViewer$BlockPullquoteCell;->requestLayout()V
.line 9031
return-void
.end method