GboardOnboardingUtils.java
3.65 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
package com.bitstrips.imoji.onboarding.gboard;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.OvershootInterpolator;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
import java.util.Iterator;
import java.util.List;
public class GboardOnboardingUtils
{
public static final String GBOARD_PACKAGE_NAME = "com.google.android.inputmethod.latin";
public static Animator fadeInAnimator(View paramView)
{
paramView = ObjectAnimator.ofFloat(paramView, "alpha", new float[] { 0.0F, 1.0F });
paramView.setInterpolator(new AccelerateDecelerateInterpolator());
paramView.setDuration(300L);
return paramView;
}
public static boolean hasSupportedGboardVersion(Context paramContext)
{
Object localObject = ((InputMethodManager)paramContext.getSystemService("input_method")).getInputMethodList();
if (localObject != null)
{
localObject = ((List)localObject).iterator();
do
{
if (!((Iterator)localObject).hasNext()) {
break;
}
} while (!"com.google.android.inputmethod.latin".equals(((InputMethodInfo)((Iterator)localObject).next()).getPackageName()));
}
for (int i = 1; i == 0; i = 0) {
return false;
}
paramContext = paramContext.getPackageManager();
try
{
paramContext = paramContext.getPackageInfo("com.google.android.inputmethod.latin", 0);
if (paramContext.versionCode >= 26650310) {
return true;
}
}
catch (PackageManager.NameNotFoundException paramContext)
{
return false;
}
return false;
}
public static Animator pulseAnimator(View paramView)
{
paramView = ObjectAnimator.ofPropertyValuesHolder(paramView, new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.0F, 1.05F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.0F, 1.05F }) });
paramView.setRepeatCount(-1);
paramView.setRepeatMode(2);
paramView.setDuration(750L);
paramView.setInterpolator(new AccelerateDecelerateInterpolator());
return paramView;
}
public static Animator slideInAnimator(View paramView)
{
paramView = ObjectAnimator.ofFloat(paramView, "translationY", new float[] { paramView.getHeight(), 0.0F });
paramView.setInterpolator(new AccelerateDecelerateInterpolator());
paramView.setDuration(300L);
return paramView;
}
public static Animator springInAnimator(View paramView)
{
ObjectAnimator localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder(paramView, new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 0.5F, 1.0F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 0.5F, 1.0F }), PropertyValuesHolder.ofFloat("rotation", new float[] { -25.0F, 0.0F }) });
localObjectAnimator.setInterpolator(new OvershootInterpolator(2.1F));
AnimatorSet localAnimatorSet = new AnimatorSet();
localAnimatorSet.playTogether(new Animator[] { localObjectAnimator, fadeInAnimator(paramView) });
localAnimatorSet.setDuration(300L);
return localAnimatorSet;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/onboarding/gboard/GboardOnboardingUtils.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/