Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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_goodmoney
Commits
851618ea
Commit
851618ea
authored
Nov 05, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开屏页代码优化,更新穿山甲版本
parent
37863e7a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
53 deletions
+64
-53
build.gradle
GoodMoney/app/build.gradle
+3
-5
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+3
-2
SplashCsjADActivity.kt
...a/com/mints/goodmoney/ui/activitys/SplashCsjADActivity.kt
+34
-5
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+4
-8
ForegroundOrBackground.java
...ava/com/mints/goodmoney/utils/ForegroundOrBackground.java
+5
-28
themes.xml
GoodMoney/app/src/main/res/values/themes.xml
+15
-5
No files found.
GoodMoney/app/build.gradle
View file @
851618ea
...
@@ -346,11 +346,9 @@ dependencies {
...
@@ -346,11 +346,9 @@ dependencies {
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// 穿山甲广告 4.0.11
// 穿山甲广告
// implementation 'com.pangle.cn:ads-sdk-pro:4.0.1.9'
implementation
'com.pangle.cn:ads-sdk-pro:4.0.1.9'
// implementation 'com.pangle.cn:ads-sdk-pro:3.9.0.5'
// implementation(name: 'tools_release', ext: 'aar')
implementation
'com.pangle.cn:ads-sdk-pro:4.0.0.6'
implementation
(
name:
'tools_release'
,
ext:
'aar'
)
// 广点通广告 腾讯
// 广点通广告 腾讯
implementation
(
name:
'GDTSDK.unionNormal.4.420.1290'
,
ext:
'aar'
)
implementation
(
name:
'GDTSDK.unionNormal.4.420.1290'
,
ext:
'aar'
)
// 快手
// 快手
...
...
GoodMoney/app/src/main/AndroidManifest.xml
View file @
851618ea
...
@@ -202,6 +202,7 @@
...
@@ -202,6 +202,7 @@
<activity
<activity
android:name=
".ui.activitys.SplashCsjADActivity"
android:name=
".ui.activitys.SplashCsjADActivity"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
>
android:theme=
"@style/NormalSplash"
>
<intent-filter>
<intent-filter>
...
@@ -379,8 +380,8 @@
...
@@ -379,8 +380,8 @@
android:grantUriPermissions=
"true"
>
android:grantUriPermissions=
"true"
>
<meta-data
<meta-data
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:name=
"android.support.FILE_PROVIDER_PATHS"
tools:replace=
"android:resource
"
android:resource=
"@xml/file_paths
"
android:resource=
"@xml/file_paths
"
/>
tools:replace=
"android:resource
"
/>
</provider>
</provider>
<provider
<provider
android:name=
"com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
android:name=
"com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashCsjADActivity.kt
View file @
851618ea
package
com.mints.goodmoney.ui.activitys
package
com.mints.goodmoney.ui.activitys
import
android.content.Intent
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.KeyEvent
import
android.view.View
import
android.view.View
...
@@ -33,6 +35,26 @@ class SplashCsjADActivity : BaseActivity() {
...
@@ -33,6 +35,26 @@ class SplashCsjADActivity : BaseActivity() {
private
var
mTTAdNative
:
TTAdNative
?
=
null
private
var
mTTAdNative
:
TTAdNative
?
=
null
companion
object
{
const
val
IS_FROM_BACKGROUND
=
"IS_FROM_BACKGROUND"
}
private
var
isFromBackground
=
false
override
fun
onNewIntent
(
intent
:
Intent
?)
{
super
.
onNewIntent
(
intent
)
intent
?.
let
{
isFromBackground
=
it
.
extras
?.
getBoolean
(
IS_FROM_BACKGROUND
,
false
)
?:
false
}
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
isFromBackground
=
it
.
getBoolean
(
IS_FROM_BACKGROUND
,
false
)
}
}
override
fun
getContentViewLayoutID
():
Int
{
override
fun
getContentViewLayoutID
():
Int
{
return
R
.
layout
.
activity_splash_ylh
return
R
.
layout
.
activity_splash_ylh
}
}
...
@@ -61,7 +83,7 @@ class SplashCsjADActivity : BaseActivity() {
...
@@ -61,7 +83,7 @@ class SplashCsjADActivity : BaseActivity() {
private
fun
loadSplashAd
()
{
private
fun
loadSplashAd
()
{
//step3:创建开屏广告请求参数AdSlot
//step3:创建开屏广告请求参数AdSlot
va
r
adSlot
:
AdSlot
?
=
AdSlot
.
Builder
()
va
l
adSlot
:
AdSlot
?
=
AdSlot
.
Builder
()
.
setCodeId
(
TtCsjAdManager
.
TT_AD_SPLASH
)
.
setCodeId
(
TtCsjAdManager
.
TT_AD_SPLASH
)
.
setImageAcceptedSize
(
1080
,
1920
)
.
setImageAcceptedSize
(
1080
,
1920
)
.
build
()
.
build
()
...
@@ -152,13 +174,20 @@ class SplashCsjADActivity : BaseActivity() {
...
@@ -152,13 +174,20 @@ class SplashCsjADActivity : BaseActivity() {
}
}
private
fun
readyGoOtherActivity
()
{
private
fun
readyGoOtherActivity
()
{
if
(
isFromBackground
)
{
finish
()
return
}
val
customVersion
:
Int
=
ps
.
getInt
(
Constant
.
CUSTOM_VERSION
,
0
)
val
customVersion
:
Int
=
ps
.
getInt
(
Constant
.
CUSTOM_VERSION
,
0
)
val
isFirstEnter
:
Boolean
=
ps
.
getBoolean
(
Constant
.
ISFIRSTENTER
+
customVersion
,
true
)
val
isFirstEnter
:
Boolean
=
ps
.
getBoolean
(
Constant
.
ISFIRSTENTER
+
customVersion
,
true
)
if
(
isFirstEnter
)
{
if
(
isFirstEnter
)
{
readyGoThenKill
(
GuideActivity
::
class
.
java
)
readyGoThenKill
(
GuideActivity
::
class
.
java
)
}
else
{
}
else
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
UserManager
.
getInstance
().
userIsLogin
())
{
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
UserManager
.
getInstance
()
.
userIsLogin
()
)
{
readyGo
(
WxLoginActivity
::
class
.
java
)
readyGo
(
WxLoginActivity
::
class
.
java
)
}
else
{
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
readyGoThenKill
(
MainActivity
::
class
.
java
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
851618ea
...
@@ -14,7 +14,6 @@ import android.widget.GridView
...
@@ -14,7 +14,6 @@ import android.widget.GridView
import
androidx.core.content.ContextCompat
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.viewpager.widget.ViewPager
import
androidx.viewpager.widget.ViewPager
import
com.bytedance.tools.ui.ToolsActivity
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.fly.scenemodule.SceneUtil
import
com.fly.scenemodule.SceneUtil
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.BuildConfig
...
@@ -1057,15 +1056,12 @@ class MyFragment : BaseFragment(),
...
@@ -1057,15 +1056,12 @@ class MyFragment : BaseFragment(),
jumpQQGroup
()
jumpQQGroup
()
}
}
R
.
id
.
item_title_id
->
{
R
.
id
.
item_title_id
->
{
// if (!userManager.userIsLogin()) {
if
(!
userManager
.
userIsLogin
())
{
// readyGo(WxLoginActivity::class.java)
readyGo
(
WxLoginActivity
::
class
.
java
)
// }
}
awardVideo
(
0
,
""
)
}
}
R
.
id
.
iv_right_icon
->
{
R
.
id
.
iv_right_icon
->
{
// readyGo(SettingsActivity::class.java)
readyGo
(
SettingsActivity
::
class
.
java
)
readyGo
(
ToolsActivity
::
class
.
java
)
}
}
R
.
id
.
btn_withdraw
->
{
R
.
id
.
btn_withdraw
->
{
if
(
userConfig
==
null
)
{
if
(
userConfig
==
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ForegroundOrBackground.java
View file @
851618ea
...
@@ -30,8 +30,6 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -30,8 +30,6 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
private
static
WeakReference
<
Activity
>
app_activity
;
private
static
WeakReference
<
Activity
>
app_activity
;
private
VersionUpdatePresenter
vup
;
private
VersionUpdatePresenter
vup
;
private
WeakReference
<
Activity
>
reference
;
private
WeakReference
<
Activity
>
reference
;
private
Intent
ylhIntent
;
private
Intent
groIntent
;
private
Intent
csjIntent
;
private
Intent
csjIntent
;
public
static
ForegroundOrBackground
init
(
Application
application
)
{
public
static
ForegroundOrBackground
init
(
Application
application
)
{
...
@@ -99,35 +97,14 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -99,35 +97,14 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
return
;
return
;
}
}
if
(
count
==
0
)
{
if
(
count
==
0
&&
!(
activity
instanceof
SplashCsjADActivity
))
{
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// 60秒后打开应用 显示开屏广告
// 60秒后打开应用 显示开屏广告
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
30000
)
{
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
30000
)
{
if
(
csjIntent
==
null
)
{
// if (AppConfig.groMoreVideoAdCount > 0) {
csjIntent
=
new
Intent
(
activity
,
SplashCsjADActivity
.
class
);
if
(
groIntent
==
null
)
{
}
groIntent
=
new
Intent
(
activity
,
SplashCsjADActivity
.
class
);
csjIntent
.
putExtra
(
SplashCsjADActivity
.
IS_FROM_BACKGROUND
,
true
);
}
activity
.
startActivity
(
csjIntent
);
activity
.
startActivity
(
groIntent
);
// } else {
// 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);
// }
// }
}
}
}
}
count
++;
count
++;
...
...
GoodMoney/app/src/main/res/values/themes.xml
View file @
851618ea
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources
xmlns:tools=
"http://schemas.android.com/tools"
>
<!-- <style name="AppTheme" parent="AppTheme.Base" />-->
<!-- <style name="AppTheme" parent="AppTheme.Base" />-->
...
@@ -33,9 +33,19 @@
...
@@ -33,9 +33,19 @@
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
</style>
</style>
<style
name=
"NormalSplash"
parent=
"Theme.AppCompat.NoActionBar"
>
<style
name=
"NormalSplash"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<item
name=
"android:windowBackground"
>
@drawable/splash_bg
</item>
<item
name=
"android:windowFullscreen"
>
true
</item>
<!--可选-->
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowContentOverlay"
>
@null
</item>
<!--可选-->
<item
name=
"android:windowContentOverlay"
>
@null
</item>
<item
name=
"android:windowTranslucentStatus"
>
true
</item>
<!--沉浸透明状态栏 可选-->
<item
name=
"android:windowBackground"
>
@drawable/splash_bg
</item>
<!--必须,整个核心都在这里-->
<!--其他的属性都不要加了 特别不要开启 windowIsTranslucent/windowDisablePreview 混用,或者关闭即可-->
<!-- 否则效果不对,达不到秒开效果-->
<item
name=
"android:windowIsTranslucent"
>
false
</item>
<item
name=
"android:windowDisablePreview"
>
false
</item>
<item
name=
"android:navigationBarColor"
>
@color/white
</item>
<item
name=
"android:statusBarColor"
>
@color/white
</item>
<item
name=
"android:windowLightStatusBar"
tools:ignore=
"NewApi"
>
true
</item>
<item
name=
"android:windowLightNavigationBar"
tools:ignore=
"NewApi"
>
true
</item>
</style>
</style>
</resources>
</resources>
\ No newline at end of file
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