Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_aiyuebao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_aiyuebao
Commits
675c4028
Commit
675c4028
authored
May 12, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐藏广告
parent
a0c0b1bd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
39 deletions
+45
-39
SplashADActivity.kt
...java/com/wenshu/aiyuebao/ui/activitys/SplashADActivity.kt
+10
-9
BaseActivity.java
...a/com/wenshu/aiyuebao/ui/activitys/base/BaseActivity.java
+1
-1
MyFragment.kt
...c/main/java/com/wenshu/aiyuebao/ui/fragment/MyFragment.kt
+1
-1
ForegroundOrBackground.java
...ava/com/wenshu/aiyuebao/utils/ForegroundOrBackground.java
+28
-28
activity_award.xml
app/src/main/res/layout/activity_award.xml
+1
-0
activity_food_subsidy.xml
app/src/main/res/layout/activity_food_subsidy.xml
+1
-0
activity_morning_clock.xml
app/src/main/res/layout/activity_morning_clock.xml
+1
-0
activity_walk.xml
app/src/main/res/layout/activity_walk.xml
+1
-0
activity_water.xml
app/src/main/res/layout/activity_water.xml
+1
-0
No files found.
app/src/main/java/com/wenshu/aiyuebao/ui/activitys/SplashADActivity.kt
View file @
675c4028
...
...
@@ -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
()
}
}
...
...
app/src/main/java/com/wenshu/aiyuebao/ui/activitys/base/BaseActivity.java
View file @
675c4028
...
...
@@ -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
);
...
...
app/src/main/java/com/wenshu/aiyuebao/ui/fragment/MyFragment.kt
View file @
675c4028
...
...
@@ -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
()
...
...
app/src/main/java/com/wenshu/aiyuebao/utils/ForegroundOrBackground.java
View file @
675c4028
...
...
@@ -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, SplashKs
ADActivity.class);
//
csjIntent = new Intent(activity, SplashCsj
ADActivity.class);
// }
// activity.startActivity(ksIntent);
}
}
}
// activity.startActivity(csjIntent);
//
//// if (ksIntent == null) {
//// // 快手广告
//// ksIntent = new Intent(activity, SplashKsADActivity.class);
//// }
//// activity.startActivity(ksIntent);
// }
// }
// }
count
++;
}
...
...
app/src/main/res/layout/activity_award.xml
View file @
675c4028
...
...
@@ -170,6 +170,7 @@
</FrameLayout>
<FrameLayout
android:visibility=
"gone"
android:id=
"@+id/flAwardAd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/activity_food_subsidy.xml
View file @
675c4028
...
...
@@ -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"
...
...
app/src/main/res/layout/activity_morning_clock.xml
View file @
675c4028
...
...
@@ -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"
>
...
...
app/src/main/res/layout/activity_walk.xml
View file @
675c4028
...
...
@@ -42,6 +42,7 @@
<FrameLayout
android:id=
"@+id/flWalkAd"
android:visibility=
"gone"
android:layout_width=
"340dp"
android:layout_height=
"340dp"
android:layout_marginTop=
"20dp"
...
...
app/src/main/res/layout/activity_water.xml
View file @
675c4028
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment