MD5 校验值:27cf44ec6e0720408f5ef017a90a3331
d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.jb.gokeyboard.theme.template.fragment; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Paint; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; import android.os.Message; import android.support.v4.app.Fragment; import android.text.SpannableString; import android.text.method.LinkMovementMethod; import android.text.style.ForegroundColorSpan; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.FrameLayout; import android.widget.TextView; import com.jb.gokeyboard.theme.emojiztfors9.getjar.R; import com.jb.gokeyboard.theme.template.ThemeApplication; import com.jb.gokeyboard.theme.template.advertising.adSdk.d.c; import com.jb.gokeyboard.theme.template.advertising.adSdk.view.CombinationAdLayout; import com.jb.gokeyboard.theme.template.networkimageview.KPNetworkImageView; import com.jb.gokeyboard.theme.template.util.g; import com.jb.gokeyboard.theme.template.util.h; import com.jb.gokeyboard.theme.template.util.k; import com.jb.gokeyboard.theme.template.view.ThemeLauncherAnimationProgress; import com.jb.gokeyboard.theme.template.view.URLSpanNoUnderline; import com.jiubang.commerce.ad.http.bean.BaseModuleDataItemBean; import com.jiubang.commerce.statistics.BaseSeq105OperationStatistic; public class d extends Fragment implements View.OnClickListener, Animation.AnimationListener, ThemeLauncherAnimationProgress.a { CombinationAdLayout a; private FrameLayout b; private a c; private TextView d; private TextView e; private View f; private View g; private ViewGroup h; private FrameLayout i; private View j; private KPNetworkImageView k; private Button l; private com.jb.gokeyboard.theme.template.advertising.adSdk.b.b m; private Animation n; private Animation o; private Animation p; private Animation q; private Animation r; private Animation s; private b t; private ThemeLauncherAnimationProgress u; private TextView x; private boolean v = false; private boolean w = false; private Handler y = new Handler() { @Override public void handleMessage(Message message) { switch (message.what) { case 1: d.this.a(); return; default: return; } } }; public interface a { void k(); } public static d a(a aVar) { d dVar = new d(); dVar.b(aVar); return dVar; } public d() { c(); } private void c() { this.m = new com.jb.gokeyboard.theme.template.advertising.adSdk.b.b() { @Override public void a(int i, com.jb.gokeyboard.theme.template.advertising.adSdk.e.a aVar, boolean z, com.jb.gokeyboard.theme.template.advertising.adSdk.d.b bVar) { d.this.a(aVar, R.layout.combination_open_ad_layout); aVar.h(); } }; com.jb.gokeyboard.theme.template.advertising.adSdk.a.a().a(23, g.a(23), new com.jb.gokeyboard.theme.template.advertising.adSdk.a.f() { @Override public void a(com.jb.gokeyboard.theme.template.advertising.adSdk.b bVar) { bVar.a((com.jb.gokeyboard.theme.template.advertising.adSdk.a.a) new com.jb.gokeyboard.theme.template.advertising.adSdk.b.a()); bVar.a((com.jb.gokeyboard.theme.template.advertising.adSdk.a.a) d.this.m); bVar.a(new com.jb.gokeyboard.theme.template.advertising.adSdk.a.e() { @Override public boolean a(com.jb.gokeyboard.theme.template.advertising.adSdk.d.b bVar2) { bVar2.b(true); bVar2.a(new c.a(R.layout.combination_open_ad_layout).e(R.id.icon).d(R.id.banner_image).a(R.id.Summary).b(R.id.tips).c(R.id.right_enter).a()); return false; } }); } }); com.jb.gokeyboard.theme.template.advertising.adSdk.a.a().a(23); } @Override @SuppressLint({"InflateParams"}) public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { this.b = (FrameLayout) layoutInflater.inflate(R.layout.launcher_home, (ViewGroup) null); this.h = (ViewGroup) this.b.findViewById(R.id.ad_root); this.u = (ThemeLauncherAnimationProgress) this.b.findViewById(R.id.loading); this.f = this.b.findViewById(R.id.backgound); this.g = this.b.findViewById(R.id.logo); this.d = (TextView) this.b.findViewById(R.id.guide_text); this.e = (TextView) this.b.findViewById(R.id.btn_download); this.i = (FrameLayout) this.b.findViewById(R.id.ad_container); this.k = (KPNetworkImageView) this.b.findViewById(R.id.ad_banner); this.j = this.b.findViewById(R.id.eye); this.l = (Button) this.b.findViewById(R.id.skip); this.l.setOnClickListener(this); this.x = (TextView) this.b.findViewById(R.id.protocol_text); m(); d(); i(); return this.b; } @Override public void onViewCreated(View view, Bundle bundle) { super.onViewCreated(view, bundle); f(); } @Override public void onResume() { super.onResume(); if (!this.w) { this.w = true; long j = 5000; if (!k.g(getContext())) { j = 2000; } this.u.a((float) j); this.u.a(this); this.u.a(); } } private void d() { this.e.setOnClickListener(this); if (ThemeApplication.a) { ((View) this.e.getParent()).setVisibility(8); this.f.setVisibility(8); this.d.setVisibility(8); } else { ((View) this.e.getParent()).setVisibility(0); this.f.setVisibility(0); this.d.setVisibility(0); e(); } } private void e() { com.jb.gokeyboard.theme.template.statistics.a.a("download_f000", "-1", ThemeApplication.b(), "-1", 1, ThemeApplication.a ? "1" : BaseModuleDataItemBean.AD_DATA_SOURCE_TYPE_OFFLINE, ThemeApplication.b(), "1", "-1"); } private void f() { this.p = AnimationUtils.loadAnimation(getContext(), R.anim.logo_translate_anim); this.q = AnimationUtils.loadAnimation(getContext(), R.anim.download_anim); this.n = AnimationUtils.loadAnimation(getContext(), R.anim.ad_banner_anim); this.o = AnimationUtils.loadAnimation(getContext(), R.anim.bg_anim); this.r = AnimationUtils.loadAnimation(getContext(), R.anim.skip_anim); this.r.setAnimationListener(this); this.s = AnimationUtils.loadAnimation(getContext(), R.anim.ad_eye); } private void g() { this.d.startAnimation(this.q); ((View) this.e.getParent()).startAnimation(this.q); this.g.startAnimation(this.p); this.f.startAnimation(this.o); this.h.setVisibility(0); this.i.startAnimation(this.n); this.l.startAnimation(this.r); this.j.startAnimation(this.s); } public void a(final com.jb.gokeyboard.theme.template.advertising.adSdk.e.a aVar, final int i) { this.y.post(new Runnable() { @Override public void run() { d.this.b(aVar, i); aVar.h(); d.this.b.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (d.this.a != null) { d.this.a.performClick(); } } }); } }); this.u.b(); this.v = true; } public void b(com.jb.gokeyboard.theme.template.advertising.adSdk.e.a aVar, int i) { this.k.setVisibility(8); this.a = (CombinationAdLayout) LayoutInflater.from(getContext()).inflate(i, (ViewGroup) null); this.a.a(R.dimen.ad_download_margin, R.dimen.ad_download_margin); this.a.a(aVar, getContext().getResources().getDrawable(R.drawable.goplugin_appinfo_banner_default), this.i, R.id.combination_ad_layou_rootview); this.a.a(new CombinationAdLayout.a() { @Override public void a() { d.this.l(); } }); } private void h() { this.t = new b(3500L, 1000L); this.t.start(); } public void a() { if (this.c != null) { this.c.k(); } } public void b(a aVar) { this.c = aVar; } private void i() { com.jb.gokeyboard.theme.template.statistics.a.a("gokeyboard", "-1", ThemeApplication.b(), "-1", 1, ThemeApplication.a ? "1" : BaseModuleDataItemBean.AD_DATA_SOURCE_TYPE_OFFLINE, ThemeApplication.b(), "-1", "-1"); } private void j() { com.jb.gokeyboard.theme.template.statistics.a.a(BaseSeq105OperationStatistic.SDK_AD_CLICK, "-1", "-1", "-1", 1, ThemeApplication.a ? "1" : BaseModuleDataItemBean.AD_DATA_SOURCE_TYPE_OFFLINE, ThemeApplication.b(), "5", "-1"); com.jb.gokeyboard.theme.template.statistics.a.a("download_click", "-1", ThemeApplication.b(), "-1", 1, ThemeApplication.a ? "1" : BaseModuleDataItemBean.AD_DATA_SOURCE_TYPE_OFFLINE, ThemeApplication.b(), "1", "-1"); } private void k() { com.jb.gokeyboard.theme.template.statistics.a.a("skip_click", "-1", "-1", "-1", 1, "-1", ThemeApplication.b(), "-1", "-1"); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.btn_download: com.jb.gokeyboard.theme.template.util.b.n(getContext()); j(); return; case R.id.skip: l(); return; default: return; } } public void l() { k(); a(); } @Override public void onDestroy() { super.onDestroy(); this.c = null; this.y.removeCallbacksAndMessages(null); if (this.t != null) { this.t.cancel(); } com.jb.gokeyboard.theme.template.advertising.adSdk.a.a().d(23); com.jb.gokeyboard.theme.template.advertising.adSdk.a.a().a(23, this.m); } @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { h(); } @Override public void onAnimationRepeat(Animation animation) { } @Override public void b() { if (this.v) { g(); } else { a(); } } public class b extends CountDownTimer { public b(long j, long j2) { super(j, j2); } @Override public void onTick(long j) { d.this.l.setText(((int) (j / 1000)) + "s to skip"); } @Override public void onFinish() { d.this.l.setText("0s to skip"); d.this.a(); } } private void m() { if (this.x != null) { String string = getResources().getString(R.string.gokeyboard_agreement_text); String string2 = getResources().getString(R.string.gokeyboard_agreement_pro_text, string); if (!getResources().getBoolean(R.bool.protocol_text_single_line)) { Paint paint = new Paint(); paint.setTextSize(getResources().getDimension(R.dimen.keyboard_protocoltext_size)); int measureText = (int) paint.measureText(string2); if ((getResources().getBoolean(R.bool.protocol_text_need_new_line) && !com.jb.gokeyboard.theme.template.util.a.b()) || measureText > h.b(getContext()) - 8) { string2 = String.format(getResources().getString(R.string.gokeyboard_agreement_pro_text), "\n" + string); } } int indexOf = string2.indexOf(string); int length = string.length() + indexOf; SpannableString spannableString = new SpannableString(string2); if (indexOf != -1) { final String n = n(); spannableString.setSpan(new URLSpanNoUnderline(n) { @Override public void onClick(View view) { String n2; Context applicationContext = d.this.getContext().getApplicationContext(); n2 = d.this.n(); com.jb.gokeyboard.theme.template.util.b.o(applicationContext, n2); } }, indexOf, length, 33); spannableString.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.gokeyboard_agreement_text_color)), indexOf, length, 33); } this.x.setText(spannableString); this.x.setMovementMethod(LinkMovementMethod.getInstance()); } } public String n() { String s = com.jb.gokeyboard.theme.template.util.b.s(getContext()); if (s == null) { return "http://godfs.3g.cn/dynamic/GOKeyboard/privacy-policy.htm"; } String lowerCase = s.toLowerCase(); if (!lowerCase.equals("cn") && !lowerCase.equals("tw") && !lowerCase.equals("hk")) { return "http://godfs.3g.cn/dynamic/GOKeyboard/privacy-policy.htm"; } return "http://godfs.3g.cn/dynamic/GOKeyboard/隐私政策.htm"; } }