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
Hide 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 {
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// 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:3.9.0.5'
implementation
'com.pangle.cn:ads-sdk-pro:4.0.0.6'
implementation
(
name:
'tools_release'
,
ext:
'aar'
)
// 穿山甲广告
implementation
'com.pangle.cn:ads-sdk-pro:4.0.1.9'
// implementation(name: 'tools_release', ext: 'aar')
// 广点通广告 腾讯
implementation
(
name:
'GDTSDK.unionNormal.4.420.1290'
,
ext:
'aar'
)
// 快手
...
...
GoodMoney/app/src/main/AndroidManifest.xml
View file @
851618ea
...
...
@@ -202,6 +202,7 @@
<activity
android:name=
".ui.activitys.SplashCsjADActivity"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/NormalSplash"
>
<intent-filter>
...
...
@@ -379,8 +380,8 @@
android:grantUriPermissions=
"true"
>
<meta-data
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
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
import
android.content.Intent
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
...
...
@@ -33,6 +35,26 @@ class SplashCsjADActivity : BaseActivity() {
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
{
return
R
.
layout
.
activity_splash_ylh
}
...
...
@@ -61,10 +83,10 @@ class SplashCsjADActivity : BaseActivity() {
private
fun
loadSplashAd
()
{
//step3:创建开屏广告请求参数AdSlot
va
r
adSlot
:
AdSlot
?
=
AdSlot
.
Builder
()
.
setCodeId
(
TtCsjAdManager
.
TT_AD_SPLASH
)
.
setImageAcceptedSize
(
1080
,
1920
)
.
build
()
va
l
adSlot
:
AdSlot
?
=
AdSlot
.
Builder
()
.
setCodeId
(
TtCsjAdManager
.
TT_AD_SPLASH
)
.
setImageAcceptedSize
(
1080
,
1920
)
.
build
()
mTTAdNative
!!
.
loadSplashAd
(
adSlot
,
object
:
TTAdNative
.
SplashAdListener
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
...
...
@@ -152,13 +174,20 @@ class SplashCsjADActivity : BaseActivity() {
}
private
fun
readyGoOtherActivity
()
{
if
(
isFromBackground
)
{
finish
()
return
}
val
customVersion
:
Int
=
ps
.
getInt
(
Constant
.
CUSTOM_VERSION
,
0
)
val
isFirstEnter
:
Boolean
=
ps
.
getBoolean
(
Constant
.
ISFIRSTENTER
+
customVersion
,
true
)
if
(
isFirstEnter
)
{
readyGoThenKill
(
GuideActivity
::
class
.
java
)
}
else
{
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
)
}
else
{
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
import
androidx.core.content.ContextCompat
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.viewpager.widget.ViewPager
import
com.bytedance.tools.ui.ToolsActivity
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.fly.scenemodule.SceneUtil
import
com.mints.goodmoney.BuildConfig
...
...
@@ -1057,15 +1056,12 @@ class MyFragment : BaseFragment(),
jumpQQGroup
()
}
R
.
id
.
item_title_id
->
{
// if (!userManager.userIsLogin()) {
// readyGo(WxLoginActivity::class.java)
// }
awardVideo
(
0
,
""
)
if
(!
userManager
.
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
}
}
R
.
id
.
iv_right_icon
->
{
// readyGo(SettingsActivity::class.java)
readyGo
(
ToolsActivity
::
class
.
java
)
readyGo
(
SettingsActivity
::
class
.
java
)
}
R
.
id
.
btn_withdraw
->
{
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
private
static
WeakReference
<
Activity
>
app_activity
;
private
VersionUpdatePresenter
vup
;
private
WeakReference
<
Activity
>
reference
;
private
Intent
ylhIntent
;
private
Intent
groIntent
;
private
Intent
csjIntent
;
public
static
ForegroundOrBackground
init
(
Application
application
)
{
...
...
@@ -99,35 +97,14 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
return
;
}
if
(
count
==
0
)
{
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
if
(
count
==
0
&&
!(
activity
instanceof
SplashCsjADActivity
))
{
// 60秒后打开应用 显示开屏广告
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
30000
)
{
// if (AppConfig.groMoreVideoAdCount > 0) {
if
(
groIntent
==
null
)
{
groIntent
=
new
Intent
(
activity
,
SplashCsjADActivity
.
class
);
if
(
csjIntent
==
null
)
{
csjIntent
=
new
Intent
(
activity
,
SplashCsjADActivity
.
class
);
}
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);
// }
// }
csjIntent
.
putExtra
(
SplashCsjADActivity
.
IS_FROM_BACKGROUND
,
true
);
activity
.
startActivity
(
csjIntent
);
}
}
count
++;
...
...
GoodMoney/app/src/main/res/values/themes.xml
View file @
851618ea
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources
xmlns:tools=
"http://schemas.android.com/tools"
>
<!-- <style name="AppTheme" parent="AppTheme.Base" />-->
...
...
@@ -33,9 +33,19 @@
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
</style>
<style
name=
"NormalSplash"
parent=
"Theme.AppCompat.NoActionBar"
>
<item
name=
"android:windowBackground"
>
@drawable/splash_bg
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowContentOverlay"
>
@null
</item>
<style
name=
"NormalSplash"
parent=
"Theme.AppCompat.Light.NoActionBar"
>
<item
name=
"android:windowFullscreen"
>
true
</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>
</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