Private void initViews { handler = new Handler; myRunnable = new Runnable { public void run { if (!MyApplication instance requestNewInterstitial) { getLocale; Intent i = new Intent


Download 15.08 Kb.
Sana05.01.2022
Hajmi15.08 Kb.
#203912
Bog'liq
onter.txt 0


private void initViews() { handler = new Handler(); myRunnable = new Runnable() { public void run() { if (!MyApplication.instance.requestNewInterstitial()) { getLocale(); Intent i = new Intent(SplashActivity.this, HomeActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(i); finish(); } else { MyApplication.instance.mInterstitialAd.setAdListener(new AdListener() { @Override public void onAdClicked() { super.onAdClicked(); } @Override public void onAdClosed() { super.onAdClosed(); MyApplication.instance.mInterstitialAd.setAdListener(null); MyApplication.instance.mInterstitialAd = null; MyApplication.instance.ins_adRequest = null; MyApplication.instance.loadAds(); getLocale(); Intent i = new Intent(SplashActivity.this, HomeActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(i); finish(); } @Override public void onAdFailedToLoad(int i) { super.onAdFailedToLoad(i); } @Override public void onAdLoaded() { super.onAdLoaded(); } }); } } }; handler.postDelayed(myRunnable, getResources().getInteger(R.integer.time_load)); }
Download 15.08 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling