PhotoView.smali

.class public Lcom/github/chrisbanes/photoview/PhotoView;
.super Landroid/widget/ImageView;
.source "SourceFile"


# instance fields
.field private a:Lcom/github/chrisbanes/photoview/i;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3

    const/4 v0, 0x0

    .line 37
    invoke-direct {p0, p1, v0}, Lcom/github/chrisbanes/photoview/PhotoView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4

    const/4 v0, 0x0

    .line 41
    invoke-direct {p0, p1, p2, v0}, Lcom/github/chrisbanes/photoview/PhotoView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 4

    .line 45
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 46
    invoke-direct {p0}, Lcom/github/chrisbanes/photoview/PhotoView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
    .registers 5

    .line 51
    invoke-direct {p0, p1, p2, p3, p4}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V

    .line 52
    invoke-direct {p0}, Lcom/github/chrisbanes/photoview/PhotoView;->a()V

    return-void
.end method

.method private a()V
    .registers 2

    .line 56
    new-instance v0, Lcom/github/chrisbanes/photoview/i;

    invoke-direct {v0, p0}, Lcom/github/chrisbanes/photoview/i;-><init>(Landroid/widget/ImageView;)V

    iput-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 59
    sget-object v0, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;

    invoke-super {p0, v0}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    return-void
.end method


# virtual methods
.method public getAttacher()Lcom/github/chrisbanes/photoview/i;
    .registers 2

    .line 70
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    return-object v0
.end method

.method public getDisplayRect()Landroid/graphics/RectF;
    .registers 2

    .line 147
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    invoke-virtual {v0}, Lcom/github/chrisbanes/photoview/i;->a()Landroid/graphics/RectF;

    move-result-object v0

    return-object v0
.end method

.method public getImageMatrix()Landroid/graphics/Matrix;
    .registers 2

    .line 80
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 1515
    iget-object v0, v0, Lcom/github/chrisbanes/photoview/i;->h:Landroid/graphics/Matrix;

    return-object v0
.end method

.method public getMaximumScale()F
    .registers 2

    .line 167
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3260
    iget v0, v0, Lcom/github/chrisbanes/photoview/i;->d:F

    return v0
.end method

.method public getMediumScale()F
    .registers 2

    .line 163
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3256
    iget v0, v0, Lcom/github/chrisbanes/photoview/i;->c:F

    return v0
.end method

.method public getMinimumScale()F
    .registers 2

    .line 159
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3252
    iget v0, v0, Lcom/github/chrisbanes/photoview/i;->b:F

    return v0
.end method

.method public getScale()F
    .registers 2

    .line 171
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    invoke-virtual {v0}, Lcom/github/chrisbanes/photoview/i;->b()F

    move-result v0

    return v0
.end method

.method public getScaleType()Landroid/widget/ImageView$ScaleType;
    .registers 2

    .line 75
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 1268
    iget-object v0, v0, Lcom/github/chrisbanes/photoview/i;->r:Landroid/widget/ImageView$ScaleType;

    return-object v0
.end method

.method public setAllowParentInterceptOnEdge(Z)V
    .registers 3

    .line 175
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3389
    iput-boolean p1, v0, Lcom/github/chrisbanes/photoview/i;->e:Z

    return-void
.end method

.method protected setFrame(IIII)Z
    .registers 5

    .line 127
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/ImageView;->setFrame(IIII)Z

    move-result p1

    if-eqz p1, :cond_b

    .line 129
    iget-object p2, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    invoke-virtual {p2}, Lcom/github/chrisbanes/photoview/i;->c()V

    :cond_b
    return p1
.end method

.method public setImageDrawable(Landroid/graphics/drawable/Drawable;)V
    .registers 2

    .line 102
    invoke-super {p0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 104
    iget-object p1, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    if-eqz p1, :cond_a

    .line 105
    invoke-virtual {p1}, Lcom/github/chrisbanes/photoview/i;->c()V

    :cond_a
    return-void
.end method

.method public setImageResource(I)V
    .registers 2

    .line 111
    invoke-super {p0, p1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 112
    iget-object p1, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    if-eqz p1, :cond_a

    .line 113
    invoke-virtual {p1}, Lcom/github/chrisbanes/photoview/i;->c()V

    :cond_a
    return-void
.end method

.method public setImageURI(Landroid/net/Uri;)V
    .registers 2

    .line 119
    invoke-super {p0, p1}, Landroid/widget/ImageView;->setImageURI(Landroid/net/Uri;)V

    .line 120
    iget-object p1, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    if-eqz p1, :cond_a

    .line 121
    invoke-virtual {p1}, Lcom/github/chrisbanes/photoview/i;->c()V

    :cond_a
    return-void
.end method

.method public setMaximumScale(F)V
    .registers 5

    .line 187
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3403
    iget v1, v0, Lcom/github/chrisbanes/photoview/i;->b:F

    iget v2, v0, Lcom/github/chrisbanes/photoview/i;->c:F

    invoke-static {v1, v2, p1}, Lcom/github/chrisbanes/photoview/j;->a(FFF)V

    .line 3404
    iput p1, v0, Lcom/github/chrisbanes/photoview/i;->d:F

    return-void
.end method

.method public setMediumScale(F)V
    .registers 5

    .line 183
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3398
    iget v1, v0, Lcom/github/chrisbanes/photoview/i;->b:F

    iget v2, v0, Lcom/github/chrisbanes/photoview/i;->d:F

    invoke-static {v1, p1, v2}, Lcom/github/chrisbanes/photoview/j;->a(FFF)V

    .line 3399
    iput p1, v0, Lcom/github/chrisbanes/photoview/i;->c:F

    return-void
.end method

.method public setMinimumScale(F)V
    .registers 5

    .line 179
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3393
    iget v1, v0, Lcom/github/chrisbanes/photoview/i;->c:F

    iget v2, v0, Lcom/github/chrisbanes/photoview/i;->d:F

    invoke-static {p1, v1, v2}, Lcom/github/chrisbanes/photoview/j;->a(FFF)V

    .line 3394
    iput p1, v0, Lcom/github/chrisbanes/photoview/i;->b:F

    return-void
.end method

.method public setOnClickListener(Landroid/view/View$OnClickListener;)V
    .registers 3

    .line 90
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 2419
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->m:Landroid/view/View$OnClickListener;

    return-void
.end method

.method public setOnDoubleTapListener(Landroid/view/GestureDetector$OnDoubleTapListener;)V
    .registers 3

    .line 227
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 4198
    iget-object v0, v0, Lcom/github/chrisbanes/photoview/i;->g:Landroid/view/GestureDetector;

    invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->setOnDoubleTapListener(Landroid/view/GestureDetector$OnDoubleTapListener;)V

    return-void
.end method

.method public setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
    .registers 3

    .line 85
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 2415
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->n:Landroid/view/View$OnLongClickListener;

    return-void
.end method

.method public setOnMatrixChangeListener(Lcom/github/chrisbanes/photoview/d;)V
    .registers 3

    .line 195
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3423
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->j:Lcom/github/chrisbanes/photoview/d;

    return-void
.end method

.method public setOnOutsidePhotoTapListener(Lcom/github/chrisbanes/photoview/e;)V
    .registers 3

    .line 203
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3431
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->l:Lcom/github/chrisbanes/photoview/e;

    return-void
.end method

.method public setOnPhotoTapListener(Lcom/github/chrisbanes/photoview/f;)V
    .registers 3

    .line 199
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3427
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->k:Lcom/github/chrisbanes/photoview/f;

    return-void
.end method

.method public setOnScaleChangeListener(Lcom/github/chrisbanes/photoview/g;)V
    .registers 3

    .line 231
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 4202
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->o:Lcom/github/chrisbanes/photoview/g;

    return-void
.end method

.method public setOnSingleFlingListener(Lcom/github/chrisbanes/photoview/h;)V
    .registers 3

    .line 235
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 4206
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->p:Lcom/github/chrisbanes/photoview/h;

    return-void
.end method

.method public setRotationBy(F)V
    .registers 3

    .line 139
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    invoke-virtual {v0, p1}, Lcom/github/chrisbanes/photoview/i;->a(F)V

    return-void
.end method

.method public setRotationTo(F)V
    .registers 5

    .line 135
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3242
    iget-object v1, v0, Lcom/github/chrisbanes/photoview/i;->i:Landroid/graphics/Matrix;

    const/high16 v2, 0x43b40000    # 360.0f

    rem-float/2addr p1, v2

    invoke-virtual {v1, p1}, Landroid/graphics/Matrix;->setRotate(F)V

    .line 3243
    invoke-virtual {v0}, Lcom/github/chrisbanes/photoview/i;->d()V

    return-void
.end method

.method public setScale(F)V
    .registers 6

    .line 207
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3439
    iget-object v1, v0, Lcom/github/chrisbanes/photoview/i;->f:Landroid/widget/ImageView;

    .line 3440
    invoke-virtual {v1}, Landroid/widget/ImageView;->getRight()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    int-to-float v1, v1

    iget-object v2, v0, Lcom/github/chrisbanes/photoview/i;->f:Landroid/widget/ImageView;

    .line 3441
    invoke-virtual {v2}, Landroid/widget/ImageView;->getBottom()I

    move-result v2

    div-int/lit8 v2, v2, 0x2

    int-to-float v2, v2

    const/4 v3, 0x0

    .line 3439
    invoke-virtual {v0, p1, v1, v2, v3}, Lcom/github/chrisbanes/photoview/i;->a(FFFZ)V

    return-void
.end method

.method public setScaleType(Landroid/widget/ImageView$ScaleType;)V
    .registers 6

    .line 95
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    if-eqz v0, :cond_27

    const/4 v1, 0x1

    if-nez p1, :cond_9

    const/4 v1, 0x0

    goto :goto_13

    .line 3027
    :cond_9
    sget-object v2, Lcom/github/chrisbanes/photoview/j$1;->a:[I

    invoke-virtual {p1}, Landroid/widget/ImageView$ScaleType;->ordinal()I

    move-result v3

    aget v2, v2, v3

    if-eq v2, v1, :cond_1f

    :goto_13
    if-eqz v1, :cond_27

    .line 2471
    iget-object v1, v0, Lcom/github/chrisbanes/photoview/i;->r:Landroid/widget/ImageView$ScaleType;

    if-eq p1, v1, :cond_27

    .line 2472
    iput-object p1, v0, Lcom/github/chrisbanes/photoview/i;->r:Landroid/widget/ImageView$ScaleType;

    .line 2473
    invoke-virtual {v0}, Lcom/github/chrisbanes/photoview/i;->c()V

    goto :goto_27

    .line 3029
    :cond_1f
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string v0, "Matrix scale type is not supported"

    invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_27
    :goto_27
    return-void
.end method

.method public setZoomTransitionDuration(I)V
    .registers 3

    .line 223
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3519
    iput p1, v0, Lcom/github/chrisbanes/photoview/i;->a:I

    return-void
.end method

.method public setZoomable(Z)V
    .registers 3

    .line 219
    iget-object v0, p0, Lcom/github/chrisbanes/photoview/PhotoView;->a:Lcom/github/chrisbanes/photoview/i;

    .line 3478
    iput-boolean p1, v0, Lcom/github/chrisbanes/photoview/i;->q:Z

    .line 3479
    invoke-virtual {v0}, Lcom/github/chrisbanes/photoview/i;->c()V

    return-void
.end method