Commit 675c4028 authored by mengcuiguang's avatar mengcuiguang

隐藏广告

parent a0c0b1bd
......@@ -45,15 +45,16 @@ class SplashADActivity : BaseActivity(), SplashADListener {
if (!NetUtils.isNetworkConnected(context)) {
finish()
} else {
try {
container = findViewById<View>(R.id.splash_container) as ViewGroup
// ToastUtil.showLong(WenshuApplication.getContext(), "ylh splash:$YlhAdManager.YLH_AD_SPLASH_POSTID")
fetchSplashAD(this, container, skipView, YlhAdManager.YLH_AD_SPLASH_POSTID, this, 0)
} catch (e: Exception) {
readyGoOtherActivity()
}
// try {
// container = findViewById<View>(R.id.splash_container) as ViewGroup
//
//// ToastUtil.showLong(WenshuApplication.getContext(), "ylh splash:$YlhAdManager.YLH_AD_SPLASH_POSTID")
//
// fetchSplashAD(this, container, skipView, YlhAdManager.YLH_AD_SPLASH_POSTID, this, 0)
// } catch (e: Exception) {
// readyGoOtherActivity()
// }
readyGoOtherActivity()
}
}
......
......@@ -34,7 +34,7 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
// getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
if (android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.O) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
......
......@@ -155,7 +155,7 @@ class MyFragment : BaseFragment(),
// 防止banner刷新太快
if (AntiShake.check(fl_my_banner?.id)) return
BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
// BannerManager.getTtBanner(TtCsjAdManager.TT_AD_BANNER_MY, fl_my_banner)
// 刷新喜马拉雅信息流
TTPreLoadExpressXmlyManager.getInstance().loadTtFrameLayout()
......
......@@ -99,36 +99,36 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
return;
}
if (count == 0) {
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// 60秒后打开应用 显示开屏广告
if (System.currentTimeMillis() - leaveTime >= 60000) {
if (isYlhSplash) {
isYlhSplash = false;
if (ylhIntent == null) {
// 优量汇广告
ylhIntent = new Intent(activity, SplashADActivity.class);
}
activity.startActivity(ylhIntent);
} else {
isYlhSplash = true;
if (csjIntent == null) {
// 快手广告
csjIntent = new Intent(activity, SplashCsjADActivity.class);
}
activity.startActivity(csjIntent);
// if (ksIntent == null) {
// if (count == 0) {
//// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// // 60秒后打开应用 显示开屏广告
// if (System.currentTimeMillis() - leaveTime >= 60000) {
//
// if (isYlhSplash) {
// isYlhSplash = false;
//
// if (ylhIntent == null) {
// // 优量汇广告
// ylhIntent = new Intent(activity, SplashADActivity.class);
// }
// activity.startActivity(ylhIntent);
// } else {
// isYlhSplash = true;
//
// if (csjIntent == null) {
// // 快手广告
// ksIntent = new Intent(activity, SplashKsADActivity.class);
// csjIntent = new Intent(activity, SplashCsjADActivity.class);
// }
// activity.startActivity(ksIntent);
}
}
}
// activity.startActivity(csjIntent);
//
//// if (ksIntent == null) {
//// // 快手广告
//// ksIntent = new Intent(activity, SplashKsADActivity.class);
//// }
//// activity.startActivity(ksIntent);
// }
// }
// }
count++;
}
......
......@@ -170,6 +170,7 @@
</FrameLayout>
<FrameLayout
android:visibility="gone"
android:id="@+id/flAwardAd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -44,6 +44,7 @@
<FrameLayout
android:id="@+id/flSubsidykAd"
android:layout_width="340dp"
android:visibility="gone"
android:layout_height="340dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
......
......@@ -88,6 +88,7 @@
android:id="@+id/flMorningClockAd"
android:layout_width="340dp"
android:layout_height="340dp"
android:visibility="gone"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@color/color_0000">
......
......@@ -42,6 +42,7 @@
<FrameLayout
android:id="@+id/flWalkAd"
android:visibility="gone"
android:layout_width="340dp"
android:layout_height="340dp"
android:layout_marginTop="20dp"
......
......@@ -41,6 +41,7 @@
<FrameLayout
android:id="@+id/flWaterAd"
android:visibility="gone"
android:layout_width="340dp"
android:layout_height="340dp"
android:layout_gravity="center_horizontal"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment