AdaptionRelativeLayout.smali
.class public Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;
.super Landroid/widget/RelativeLayout;
.source "AdaptionRelativeLayout.java"
# instance fields
.field a:Ljava/lang/Boolean;
.field private b:F
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.prologue
.line 13
invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V
.line 11
const/4 v0, 0x0
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
iput-object v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->a:Ljava/lang/Boolean;
.line 24
const v0, 0x3ff47ae1 # 1.91f
iput v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
.line 14
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 4
.prologue
.line 21
invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 11
const/4 v0, 0x0
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
iput-object v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->a:Ljava/lang/Boolean;
.line 24
const v0, 0x3ff47ae1 # 1.91f
iput v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
.line 22
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 5
.prologue
.line 17
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 11
const/4 v0, 0x0
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
iput-object v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->a:Ljava/lang/Boolean;
.line 24
const v0, 0x3ff47ae1 # 1.91f
iput v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
.line 18
return-void
.end method
# virtual methods
.method protected onMeasure(II)V
.registers 11
.prologue
const/high16 v7, 0x3f000000 # 0.5f
const/4 v6, 0x0
const/high16 v5, 0x40000000 # 2.0f
.line 27
iget-object v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->a:Ljava/lang/Boolean;
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
if-nez v0, :cond_11
.line 28
invoke-super {p0, p1, p2}, Landroid/widget/RelativeLayout;->onMeasure(II)V
.line 51
:goto_10
return-void
.line 30
:cond_11
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I
move-result v0
.line 31
invoke-static {p2}, Landroid/view/View$MeasureSpec;->getMode(I)I
move-result v1
.line 33
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v2
invoke-virtual {p0}, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->getPaddingLeft()I
move-result v3
sub-int/2addr v2, v3
.line 34
invoke-virtual {p0}, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->getPaddingRight()I
move-result v3
sub-int/2addr v2, v3
.line 35
invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v3
invoke-virtual {p0}, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->getPaddingLeft()I
move-result v4
sub-int/2addr v3, v4
.line 36
invoke-virtual {p0}, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->getPaddingRight()I
move-result v4
sub-int/2addr v3, v4
.line 38
if-ne v0, v5, :cond_4b
iget v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
cmpl-float v0, v0, v6
if-eqz v0, :cond_4b
.line 39
int-to-float v0, v2
iget v1, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
div-float/2addr v0, v1
add-float/2addr v0, v7
float-to-int v0, v0
.line 40
invoke-static {v0, v5}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p2
.line 47
:cond_47
:goto_47
invoke-super {p0, p1, p2}, Landroid/widget/RelativeLayout;->onMeasure(II)V
goto :goto_10
.line 42
:cond_4b
if-ne v1, v5, :cond_47
iget v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
cmpl-float v0, v0, v6
if-eqz v0, :cond_47
.line 43
int-to-float v0, v3
iget v1, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->b:F
mul-float/2addr v0, v1
add-float/2addr v0, v7
float-to-int v0, v0
.line 44
invoke-static {v0, v5}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p1
goto :goto_47
.end method
.method public setIsAdaption(Z)V
.registers 3
.prologue
.line 53
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
iput-object v0, p0, Lcom/cmcm/ad/ui/bitmapcache/AdaptionRelativeLayout;->a:Ljava/lang/Boolean;
.line 54
return-void
.end method