AvatarBuilderPreviewFlash.java
4.96 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
package com.bitstrips.imoji.abv3.preview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.annotation.Keep;
import android.support.annotation.NonNull;
public class AvatarBuilderPreviewFlash
{
private final AvatarBuilderPreviewView a;
private final int b;
private float c;
private float d;
private float e;
private float f;
private final Drawable g;
private AnimatorSet h;
private int i;
AvatarBuilderPreviewFlash(@NonNull AvatarBuilderPreviewView paramAvatarBuilderPreviewView)
{
this.a = paramAvatarBuilderPreviewView;
paramAvatarBuilderPreviewView = this.a.getResources();
this.g = paramAvatarBuilderPreviewView.getDrawable(2130837607);
this.b = paramAvatarBuilderPreviewView.getDimensionPixelSize(2131361921);
}
private void a()
{
ObjectAnimator localObjectAnimator1 = ObjectAnimator.ofFloat(this, "flashOpacityA", new float[] { 0.0F, 0.9F, 0.0F });
localObjectAnimator1.setDuration(200L);
localObjectAnimator1.setStartDelay(100L);
ObjectAnimator localObjectAnimator2 = ObjectAnimator.ofFloat(this, "flashOpacityB", new float[] { 0.0F, 0.8F, 0.0F });
localObjectAnimator2.setDuration(200L);
localObjectAnimator2.setStartDelay(200L);
ObjectAnimator localObjectAnimator3 = ObjectAnimator.ofFloat(this, "flashOpacityC", new float[] { 0.0F, 0.65F, 0.0F });
localObjectAnimator3.setDuration(200L);
localObjectAnimator3.setStartDelay(300L);
ObjectAnimator localObjectAnimator4 = ObjectAnimator.ofFloat(this, "flashOpacityD", new float[] { 0.0F, 0.75F, 0.0F });
localObjectAnimator4.setDuration(200L);
localObjectAnimator4.setStartDelay(400L);
ValueAnimator localValueAnimator = ValueAnimator.ofFloat(new float[] { 0.0F, 1.0F });
localValueAnimator.setDuration(600L);
localValueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
public final void onAnimationUpdate(ValueAnimator paramAnonymousValueAnimator)
{
AvatarBuilderPreviewFlash.a(AvatarBuilderPreviewFlash.this).invalidate();
}
});
this.h = new AnimatorSet();
this.h.playTogether(new Animator[] { localObjectAnimator1, localObjectAnimator2, localObjectAnimator3, localObjectAnimator4, localValueAnimator });
this.h.start();
this.h.addListener(new AnimatorListenerAdapter()
{
public final void onAnimationEnd(Animator paramAnonymousAnimator)
{
super.onAnimationEnd(paramAnonymousAnimator);
AvatarBuilderPreviewFlash.b(AvatarBuilderPreviewFlash.this);
if ((AvatarBuilderPreviewFlash.c(AvatarBuilderPreviewFlash.this) < 3) && (AvatarBuilderPreviewFlash.d(AvatarBuilderPreviewFlash.this) == paramAnonymousAnimator)) {
AvatarBuilderPreviewFlash.e(AvatarBuilderPreviewFlash.this);
}
}
});
}
private void a(Canvas paramCanvas, float paramFloat1, float paramFloat2, float paramFloat3)
{
if (this.h == null) {
return;
}
int j = (int)paramFloat1;
int k = (int)paramFloat1;
int m = this.b;
int n = (int)paramFloat2;
int i1 = (int)paramFloat2;
int i2 = this.b;
this.g.setBounds(j, n, k + m, i1 + i2);
this.g.setAlpha((int)(255.0F * paramFloat3));
this.g.draw(paramCanvas);
}
public void draw(Canvas paramCanvas)
{
float f1 = paramCanvas.getWidth();
float f2 = paramCanvas.getHeight();
float f3 = this.b / 2;
a(paramCanvas, f1 - this.b, 0.0F, this.c);
a(paramCanvas, 0.0F, f2 - this.b, this.d);
a(paramCanvas, f1 - f3, (f2 - this.b) / 2.0F, this.e);
a(paramCanvas, -f3, -f3, this.f);
}
@Keep
public float getFlashOpacityA()
{
return this.c;
}
@Keep
public float getFlashOpacityB()
{
return this.d;
}
@Keep
public float getFlashOpacityC()
{
return this.e;
}
@Keep
public float getFlashOpacityD()
{
return this.f;
}
@Keep
public void setFlashOpacityA(float paramFloat)
{
this.c = paramFloat;
}
@Keep
public void setFlashOpacityB(float paramFloat)
{
this.d = paramFloat;
}
@Keep
public void setFlashOpacityC(float paramFloat)
{
this.e = paramFloat;
}
@Keep
public void setFlashOpacityD(float paramFloat)
{
this.f = paramFloat;
}
public void startAnimation()
{
stopAnimation();
a();
}
public void stopAnimation()
{
if (this.h != null)
{
this.h.cancel();
this.h = null;
}
this.c = 0.0F;
this.d = 0.0F;
this.e = 0.0F;
this.f = 0.0F;
this.i = 0;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/preview/AvatarBuilderPreviewFlash.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/