137 lines
2.9 KiB
Smali
137 lines
2.9 KiB
Smali
.class public Lcom/moji/imageview/ClickEffectImageView;
|
|
.super Landroid/widget/ImageView;
|
|
.source "ClickEffectImageView.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 18
|
|
invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
.line 22
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
.line 26
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
.locals 4
|
|
|
|
.line 31
|
|
invoke-virtual {p0}, Lcom/moji/imageview/ClickEffectImageView;->isEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/moji/imageview/ClickEffectImageView;->isClickable()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 32
|
|
invoke-virtual {p0}, Lcom/moji/imageview/ClickEffectImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 34
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/16 v3, 0xff
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
.line 35
|
|
invoke-virtual {v0, v3}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
|
|
|
|
.line 37
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
const/16 v1, 0x66
|
|
|
|
.line 38
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
|
|
|
|
.line 40
|
|
:cond_1
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
if-ne v1, v2, :cond_2
|
|
|
|
.line 41
|
|
invoke-virtual {v0, v3}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
|
|
|
|
.line 45
|
|
:cond_2
|
|
invoke-super {p0, p1}, Landroid/widget/ImageView;->onTouchEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public setEnabled(Z)V
|
|
.locals 2
|
|
|
|
.line 50
|
|
invoke-virtual {p0}, Lcom/moji/imageview/ClickEffectImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/16 v1, 0xff
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v1, 0x66
|
|
|
|
.line 52
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
|
|
|
|
.line 54
|
|
:cond_1
|
|
invoke-super {p0, p1}, Landroid/widget/ImageView;->setEnabled(Z)V
|
|
|
|
return-void
|
|
.end method
|