GboardOnboardingLowStorageFragment.java
5.53 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
package com.bitstrips.imoji.onboarding.gboard;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.Nullable;
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 android.widget.TextView;
import com.bitstrips.imoji.behaviour.BehaviourHelper;
import com.bitstrips.imoji.identity.AvatarManager;
import com.bitstrips.imoji.identity.AvatarManager.OnAvatarIdUpdateListener;
import com.bitstrips.imoji.persistence.MediaCache;
import com.squareup.picasso.Callback;
import com.squareup.picasso.RequestCreator;
import javax.inject.Inject;
public class GboardOnboardingLowStorageFragment
extends BaseOnboardingFragment
implements AvatarManager.OnAvatarIdUpdateListener
{
@Inject
AvatarManager c;
@Inject
BehaviourHelper d;
@Inject
MediaCache e;
private ImageView f;
private View g;
private void a()
{
final String str = getImageUrl(getContext(), this.d.getRenderEndpoint(), this.c.getAvatarId());
this.f.postDelayed(new Runnable()
{
public final void run()
{
GboardOnboardingLowStorageFragment.this.e.load(str).fit().noFade().into(GboardOnboardingLowStorageFragment.a(GboardOnboardingLowStorageFragment.this), new Callback()
{
public final void onError() {}
public final void onSuccess()
{
GboardOnboardingLowStorageFragment.b(GboardOnboardingLowStorageFragment.this).setVisibility(0);
AnimatorSet localAnimatorSet = new AnimatorSet();
localAnimatorSet.playTogether(new Animator[] { GboardOnboardingUtils.slideInAnimator(GboardOnboardingLowStorageFragment.a(GboardOnboardingLowStorageFragment.this)), GboardOnboardingUtils.springInAnimator(GboardOnboardingLowStorageFragment.b(GboardOnboardingLowStorageFragment.this)) });
localAnimatorSet.start();
}
});
}
}, getResources().getInteger(2131558419));
this.e.preload(str);
}
public static String getImageUrl(Context paramContext, String paramString1, String paramString2)
{
return paramContext.getString(2131231241, new Object[] { paramString1, paramString2 });
}
public static GboardOnboardingLowStorageFragment newInstance(long paramLong, GboardOnboardingSource paramGboardOnboardingSource)
{
GboardOnboardingLowStorageFragment localGboardOnboardingLowStorageFragment = new GboardOnboardingLowStorageFragment();
paramGboardOnboardingSource = BaseOnboardingFragment.createArguments(paramGboardOnboardingSource);
paramGboardOnboardingSource.putLong("STORAGE_REQUIRED", paramLong);
localGboardOnboardingLowStorageFragment.setArguments(paramGboardOnboardingSource);
return localGboardOnboardingLowStorageFragment;
}
public void onAvatarIdUpdate(String paramString)
{
this.f.setImageDrawable(null);
this.e.cancelRequest(this.f);
this.g.setVisibility(8);
a();
}
@Nullable
public View onCreateView(LayoutInflater paramLayoutInflater, @Nullable ViewGroup paramViewGroup, @Nullable Bundle paramBundle)
{
paramViewGroup = paramLayoutInflater.inflate(2130903119, paramViewGroup, false);
paramBundle = (Button)paramViewGroup.findViewById(2131689703);
final Button localButton = (Button)paramViewGroup.findViewById(2131689744);
TextView localTextView = (TextView)paramViewGroup.findViewById(2131689752);
this.f = ((ImageView)paramViewGroup.findViewById(2131689751));
this.g = paramViewGroup.findViewById(2131689750);
long l = getArguments().getLong("STORAGE_REQUIRED");
if (l > 1048576L) {
paramLayoutInflater = getString(2131230926, new Object[] { Long.valueOf(l / 1048576L) });
}
for (;;)
{
localTextView.setText(paramLayoutInflater);
paramBundle.setOnClickListener(new View.OnClickListener()
{
public final void onClick(View paramAnonymousView)
{
GboardOnboardingLowStorageFragment.this.skip("low_storage");
}
});
localButton.postDelayed(new Runnable()
{
public final void run()
{
localButton.setOnClickListener(new View.OnClickListener()
{
public final void onClick(View paramAnonymous2View)
{
GboardOnboardingLowStorageFragment.this.startActivity(new Intent("android.settings.MEMORY_CARD_SETTINGS"));
GboardOnboardingLowStorageFragment.this.dismiss();
}
});
localButton.setVisibility(0);
GboardOnboardingUtils.pulseAnimator(localButton).start();
GboardOnboardingUtils.fadeInAnimator(localButton).start();
}
}, getResources().getInteger(2131558418));
return paramViewGroup;
if (l > 1024L) {
paramLayoutInflater = getString(2131230925, new Object[] { Long.valueOf(l / 1024L) });
} else {
paramLayoutInflater = getString(2131230924, new Object[] { Long.valueOf(l) });
}
}
}
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/GboardOnboardingLowStorageFragment.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/