et.java
3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RadialGradient;
import android.graphics.RectF;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.os.Build.VERSION;
import android.support.v4.view.ViewCompat;
import android.util.DisplayMetrics;
import android.view.animation.Animation.AnimationListener;
import android.widget.ImageView;
public final class et
extends ImageView
{
public Animation.AnimationListener a;
int b;
public et(Context paramContext)
{
super(paramContext);
float f = getContext().getResources().getDisplayMetrics().density;
int i = (int)(1.75F * f);
int j = (int)(0.0F * f);
this.b = ((int)(3.5F * f));
if (a())
{
paramContext = new ShapeDrawable(new OvalShape());
ViewCompat.setElevation(this, f * 4.0F);
}
for (;;)
{
paramContext.getPaint().setColor(-328966);
ViewCompat.setBackground(this, paramContext);
return;
paramContext = new ShapeDrawable(new et.a(this.b));
ViewCompat.setLayerType(this, 1, paramContext.getPaint());
paramContext.getPaint().setShadowLayer(this.b, j, i, 503316480);
i = this.b;
setPadding(i, i, i, i);
}
}
private static boolean a()
{
return Build.VERSION.SDK_INT >= 21;
}
public final void onAnimationEnd()
{
super.onAnimationEnd();
if (this.a != null) {
this.a.onAnimationEnd(getAnimation());
}
}
public final void onAnimationStart()
{
super.onAnimationStart();
if (this.a != null) {
this.a.onAnimationStart(getAnimation());
}
}
protected final void onMeasure(int paramInt1, int paramInt2)
{
super.onMeasure(paramInt1, paramInt2);
if (!a()) {
setMeasuredDimension(getMeasuredWidth() + this.b * 2, getMeasuredHeight() + this.b * 2);
}
}
public final void setBackgroundColor(int paramInt)
{
if ((getBackground() instanceof ShapeDrawable)) {
((ShapeDrawable)getBackground()).getPaint().setColor(paramInt);
}
}
final class a
extends OvalShape
{
private RadialGradient b;
private Paint c = new Paint();
a(int paramInt)
{
et.this.b = paramInt;
a((int)rect().width());
}
private void a(int paramInt)
{
float f1 = paramInt / 2;
float f2 = paramInt / 2;
float f3 = et.this.b;
Shader.TileMode localTileMode = Shader.TileMode.CLAMP;
this.b = new RadialGradient(f1, f2, f3, new int[] { 1023410176, 0 }, null, localTileMode);
this.c.setShader(this.b);
}
public final void draw(Canvas paramCanvas, Paint paramPaint)
{
int i = et.this.getWidth();
int j = et.this.getHeight();
paramCanvas.drawCircle(i / 2, j / 2, i / 2, this.c);
paramCanvas.drawCircle(i / 2, j / 2, i / 2 - et.this.b, paramPaint);
}
protected final void onResize(float paramFloat1, float paramFloat2)
{
super.onResize(paramFloat1, paramFloat2);
a((int)paramFloat1);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/et.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/