Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
Easy Cleaner Junk
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Easy Cleaner Junk
Commits
1042e555
Commit
1042e555
authored
Jul 23, 2024
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
c249d5ac
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
32 deletions
+51
-32
ResultActivity.kt
.../com/test/easy/easycleanerjunk/activity/ResultActivity.kt
+1
-14
NewMainActivity.kt
...est/easy/easycleanerjunk/activity/home/NewMainActivity.kt
+28
-14
ConfigHelper.kt
.../java/com/test/easy/easycleanerjunk/helps/ConfigHelper.kt
+22
-4
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/activity/ResultActivity.kt
View file @
1042e555
...
...
@@ -127,21 +127,8 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
onBackPressedDispatcher
.
addCallback
(
object
:
OnBackPressedCallback
(
true
)
{
override
fun
handleOnBackPressed
()
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
0
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"isShowBackIntAd"
,
0
)
if
(
s
==
1
)
{
MaxAdUtils
.
showInterstitialAd
(
this
@ResultActivity
)
{
finishToMain
()
}
}
else
{
finishToMain
()
}
}
else
{
BackRelsutAt
.
launch
(
this
@ResultActivity
,
from
)
finish
()
}
}
})
binding
.
ivBack
.
setOnClickListener
{
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/home/NewMainActivity.kt
View file @
1042e555
...
...
@@ -4,7 +4,6 @@ import android.content.Intent
import
android.graphics.Color
import
android.graphics.Typeface
import
android.os.Build
import
android.util.Log
import
androidx.activity.OnBackPressedCallback
import
androidx.annotation.RequiresApi
import
androidx.fragment.app.Fragment
...
...
@@ -47,7 +46,8 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
@RequiresApi
(
Build
.
VERSION_CODES
.
O
)
override
fun
initView
()
{
ConfigHelper
.
enter_homePage
++
ConfigHelper
.
isfirstInstall
++
ConfigHelper
.
enterHomeTimes
++
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
...
...
@@ -86,8 +86,16 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
PopExitWindow
.
show
(
this
@NewMainActivity
)
}
})
Log
.
e
(
"MXL"
,
"initView: "
+
ConfigHelper
.
enter_homePage
)
if
(
ConfigHelper
.
enter_homePage
==
2
)
{
if
(
ConfigHelper
.
isfirstInstall
==
1
){
if
(
ConfigHelper
.
enterHomeTimes
.
toInt
()
==
2
||
ConfigHelper
.
enterHomeTimes
.
toInt
()
==
3
)
{
//第二次进入首页
val
s
=
SPUtils
.
getInstance
().
getInt
(
"dayoutcomeHomePage"
,
0
)
if
(
s
==
1
)
{
startActivity
(
Intent
(
this
,
BackRelsutAt
::
class
.
java
))
}
}
}
else
{
if
(
ConfigHelper
.
enterHomeTimes
.
toInt
()
==
1
||
ConfigHelper
.
enterHomeTimes
.
toInt
()
==
2
)
{
//第二次进入首页
val
s
=
SPUtils
.
getInstance
().
getInt
(
"dayoutcomeHomePage"
,
0
)
if
(
s
==
1
)
{
...
...
@@ -96,6 +104,8 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
}
}
}
private
fun
setPage
(
p
:
Int
)
{
binding
.
idBottom1
.
isSelected
=
false
binding
.
idBottom2
.
isSelected
=
false
...
...
@@ -132,6 +142,8 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
RateStarPop
.
show
(
this
@NewMainActivity
)
}
if
(
isPause
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnCount"
,
0
)
if
(
s
==
1
)
{
val
localCount
=
SPUtils
.
getInstance
().
getInt
(
"localCount"
,
0
)
SPUtils
.
getInstance
().
put
(
"localCount"
,
localCount
+
1
)
val
n
=
SPUtils
.
getInstance
().
getInt
(
"outcomeReturnHomeCount"
,
0
)
...
...
@@ -141,5 +153,7 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
}
}
}
}
}
}
app/src/main/java/com/test/easy/easycleanerjunk/helps/ConfigHelper.kt
View file @
1042e555
...
...
@@ -3,6 +3,7 @@ package com.test.easy.easycleanerjunk.helps
import
com.test.easy.easycleanerjunk.activity.splash.NewSplashActivity
import
com.test.easy.easycleanerjunk.utils.SPUtils
import
java.util.Calendar
object
ConfigHelper
{
...
...
@@ -89,13 +90,30 @@ object ConfigHelper {
SPUtils
.
getInstance
().
put
(
"fcmNotification"
,
value
,
true
)
}
//进入主页的次数
var
enter
_homePage
=
0
var
enter
HomeTimes
=
0L
get
()
{
return
SPUtils
.
getInstance
().
getInt
(
"enter_homePage"
,
field
)
val
last
=
Calendar
.
getInstance
().
apply
{
timeInMillis
=
SPUtils
.
getInstance
().
getLong
(
"enterHomeTimes"
,
field
)
}
return
Calendar
.
getInstance
().
run
{
if
(
get
(
Calendar
.
DAY_OF_YEAR
)
==
last
[
Calendar
.
DAY_OF_YEAR
])
{
last
}
else
{
set
(
Calendar
.
MILLISECOND
,
0
)
this
}
}.
timeInMillis
}
set
(
value
)
{
field
=
value
SPUtils
.
getInstance
().
put
(
"enter_homePage"
,
value
)
SPUtils
.
getInstance
().
put
(
"enterHomeTimes"
,
value
)
}
var
isfirstInstall
=
0
get
()
{
return
SPUtils
.
getInstance
().
getInt
(
"isfirstInstall"
,
field
)
}
set
(
value
)
{
field
=
value
SPUtils
.
getInstance
().
put
(
"isfirstInstall"
,
value
)
}
}
\ 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