TextScale.java
2.68 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
package android.support.design.internal;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
import android.support.transition.Transition;
import android.support.transition.TransitionValues;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.Map;
@TargetApi(14)
@RequiresApi(14)
public class TextScale
extends Transition
{
private static void a(TransitionValues paramTransitionValues)
{
if ((paramTransitionValues.view instanceof TextView))
{
TextView localTextView = (TextView)paramTransitionValues.view;
paramTransitionValues.values.put("android:textscale:scale", Float.valueOf(localTextView.getScaleX()));
}
}
public void captureEndValues(TransitionValues paramTransitionValues)
{
a(paramTransitionValues);
}
public void captureStartValues(TransitionValues paramTransitionValues)
{
a(paramTransitionValues);
}
public Animator createAnimator(final ViewGroup paramViewGroup, TransitionValues paramTransitionValues1, TransitionValues paramTransitionValues2)
{
float f2 = 1.0F;
if ((paramTransitionValues1 == null) || (paramTransitionValues2 == null) || (!(paramTransitionValues1.view instanceof TextView)) || (!(paramTransitionValues2.view instanceof TextView))) {
return null;
}
paramViewGroup = (TextView)paramTransitionValues2.view;
paramTransitionValues1 = paramTransitionValues1.values;
paramTransitionValues2 = paramTransitionValues2.values;
if (paramTransitionValues1.get("android:textscale:scale") != null) {}
for (float f1 = ((Float)paramTransitionValues1.get("android:textscale:scale")).floatValue();; f1 = 1.0F)
{
if (paramTransitionValues2.get("android:textscale:scale") != null) {
f2 = ((Float)paramTransitionValues2.get("android:textscale:scale")).floatValue();
}
if (f1 != f2) {
break;
}
return null;
}
paramTransitionValues1 = ValueAnimator.ofFloat(new float[] { f1, f2 });
paramTransitionValues1.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
public final void onAnimationUpdate(ValueAnimator paramAnonymousValueAnimator)
{
float f = ((Float)paramAnonymousValueAnimator.getAnimatedValue()).floatValue();
paramViewGroup.setScaleX(f);
paramViewGroup.setScaleY(f);
}
});
return paramTransitionValues1;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/design/internal/TextScale.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/