GboardOnboardingIntroFragment.java
5.54 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
package com.bitstrips.imoji.onboarding.gboard;
import android.animation.Animator;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import com.bitstrips.imoji.behaviour.BehaviourHelper;
import com.bitstrips.imoji.firebase.FirebaseUtils;
import com.bitstrips.imoji.identity.AvatarManager;
import com.bitstrips.imoji.identity.AvatarManager.OnAvatarIdUpdateListener;
import com.bitstrips.imoji.persistence.MediaCache;
import com.crashlytics.android.Crashlytics;
import com.squareup.picasso.Callback;
import com.squareup.picasso.RequestCreator;
import javax.inject.Inject;
public class GboardOnboardingIntroFragment
extends BaseOnboardingFragment
implements AvatarManager.OnAvatarIdUpdateListener
{
@Inject
AvatarManager c;
@Inject
BehaviourHelper d;
@Inject
MediaCache e;
private View f;
private ImageView g;
private void a()
{
final String str1 = getImageUrl(getContext(), this.d.getRenderEndpoint(), this.c.getAvatarId());
String str2 = GboardOnboardingFinishFragment.getImageUrl(getContext(), this.d.getRenderEndpoint(), this.c.getAvatarId());
this.g.postDelayed(new Runnable()
{
public final void run()
{
GboardOnboardingIntroFragment.this.e.load(str1).fit().noFade().into(GboardOnboardingIntroFragment.a(GboardOnboardingIntroFragment.this), new Callback()
{
public final void onError() {}
public final void onSuccess()
{
GboardOnboardingUtils.springInAnimator(GboardOnboardingIntroFragment.b(GboardOnboardingIntroFragment.this)).start();
}
});
}
}, getResources().getInteger(2131558419));
this.e.preload(str1);
this.e.preload(str2);
}
public static String getImageUrl(Context paramContext, String paramString1, String paramString2)
{
return paramContext.getString(2131231239, new Object[] { paramString1, paramString2, paramString2, paramString2, paramString2, paramString2 });
}
public static GboardOnboardingIntroFragment newInstance(GboardOnboardingSource paramGboardOnboardingSource)
{
GboardOnboardingIntroFragment localGboardOnboardingIntroFragment = new GboardOnboardingIntroFragment();
localGboardOnboardingIntroFragment.setArguments(BaseOnboardingFragment.createArguments(paramGboardOnboardingSource));
return localGboardOnboardingIntroFragment;
}
public void onAvatarIdUpdate(String paramString)
{
this.g.setImageDrawable(null);
this.e.cancelRequest(this.g);
a();
}
@Nullable
public View onCreateView(LayoutInflater paramLayoutInflater, @Nullable ViewGroup paramViewGroup, @Nullable final Bundle paramBundle)
{
paramLayoutInflater = paramLayoutInflater.inflate(2130903118, paramViewGroup, false);
paramViewGroup = (Button)paramLayoutInflater.findViewById(2131689703);
paramBundle = (Button)paramLayoutInflater.findViewById(2131689744);
this.f = paramLayoutInflater.findViewById(2131689742);
this.g = ((ImageView)paramLayoutInflater.findViewById(2131689749));
paramViewGroup.setOnClickListener(new View.OnClickListener()
{
public final void onClick(View paramAnonymousView)
{
GboardOnboardingIntroFragment.this.skip("intro");
}
});
paramBundle.postDelayed(new Runnable()
{
public final void run()
{
paramBundle.setOnClickListener(new View.OnClickListener()
{
public final void onClick(View paramAnonymous2View)
{
if (GboardOnboardingIntroFragment.this.didSaveInstanceState())
{
Crashlytics.logException(new IllegalStateException("Performing action after onSaveInstanceState!"));
return;
}
long l = FirebaseUtils.additionalRequiredStorageToIndex(GboardOnboardingIntroFragment.this.getContext()) + GboardOnboardingIntroFragment.this.d.getForcedGboardRequiredStorage();
if (l > 0L)
{
paramAnonymous2View = GboardOnboardingLowStorageFragment.newInstance(l, GboardOnboardingIntroFragment.this.getSource());
GboardOnboardingIntroFragment.this.sendLowStorageEvent();
}
for (;;)
{
GboardOnboardingIntroFragment.this.getFragmentManager().beginTransaction().setCustomAnimations(2130968609, 2130968612).replace(2131689651, paramAnonymous2View).addToBackStack(null).commit();
return;
paramAnonymous2View = GboardOnboardingInstructionsFragment.newInstance(GboardOnboardingIntroFragment.this.getSource());
}
}
});
paramBundle.setVisibility(0);
GboardOnboardingUtils.pulseAnimator(paramBundle).start();
GboardOnboardingUtils.fadeInAnimator(paramBundle).start();
}
}, getResources().getInteger(2131558418));
return paramLayoutInflater;
}
public void onStart()
{
super.onStart();
this.c.addOnAvatarIdUpdateListener(this);
a();
}
public void onStop()
{
super.onStop();
this.c.removeOnAvatarIdUpdateListner(this);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/onboarding/gboard/GboardOnboardingIntroFragment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/