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
34a7f3e1
Commit
34a7f3e1
authored
Jul 12, 2024
by
leichao.gao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add result and back switch
parent
538b5821
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
3 deletions
+29
-3
ResultActivity.kt
.../com/test/easy/easycleanerjunk/activity/ResultActivity.kt
+18
-3
ConfigBean.kt
...ain/java/com/test/easy/easycleanerjunk/bean/ConfigBean.kt
+2
-0
ComUtils.kt
...main/java/com/test/easy/easycleanerjunk/helps/ComUtils.kt
+1
-0
DialogViews.kt
...in/java/com/test/easy/easycleanerjunk/view/DialogViews.kt
+8
-0
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/activity/ResultActivity.kt
View file @
34a7f3e1
...
@@ -3,6 +3,7 @@ package com.test.easy.easycleanerjunk.activity
...
@@ -3,6 +3,7 @@ package com.test.easy.easycleanerjunk.activity
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
import
android.view.View
import
androidx.activity.OnBackPressedCallback
import
androidx.activity.OnBackPressedCallback
import
androidx.core.view.updatePadding
import
androidx.core.view.updatePadding
import
com.test.easy.easycleanerjunk.activity.appmanager.AppManagerAnimationActivity
import
com.test.easy.easycleanerjunk.activity.appmanager.AppManagerAnimationActivity
...
@@ -104,7 +105,8 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
...
@@ -104,7 +105,8 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
PHOTO_COMPRESS
->
{
PHOTO_COMPRESS
->
{
val
size
=
intent
.
getLongExtra
(
"size"
,
0L
).
toFormatSize
(
1
)
val
size
=
intent
.
getLongExtra
(
"size"
,
0L
).
toFormatSize
(
1
)
binding
.
tvInfo
.
text
=
"Compress ${intent.getIntExtra("
num
", 0)} photo, $size space freed"
binding
.
tvInfo
.
text
=
"Compress ${intent.getIntExtra("
num
", 0)} photo, $size space freed"
}
}
BATTERY_INFO
->
{
BATTERY_INFO
->
{
...
@@ -125,17 +127,30 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
...
@@ -125,17 +127,30 @@ class ResultActivity : BaseActivity<ActivityLayoutResultBinding>() {
onBackPressedDispatcher
.
addCallback
(
object
:
OnBackPressedCallback
(
true
)
{
onBackPressedDispatcher
.
addCallback
(
object
:
OnBackPressedCallback
(
true
)
{
override
fun
handleOnBackPressed
()
{
override
fun
handleOnBackPressed
()
{
AdmobUtils
.
showInterstitialAd
(
this
@ResultActivity
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"isShowBackIntAd"
,
0
)
if
(
s
==
1
)
{
AdmobUtils
.
showInterstitialAd
(
this
@ResultActivity
)
{
finishToMain
()
}
}
else
{
finishToMain
()
finishToMain
()
}
}
}
}
})
})
binding
.
ivBack
.
setOnClickListener
{
binding
.
ivBack
.
setOnClickListener
{
onBackPressedDispatcher
.
onBackPressed
()
onBackPressedDispatcher
.
onBackPressed
()
}
}
val
ss
=
SPUtils
.
getInstance
().
getInt
(
"isShowResultNaAd"
,
0
)
if
(
ss
==
1
)
{
binding
.
flAd
.
visibility
=
View
.
VISIBLE
AdmobUtils
.
showNativeAd
(
this
@ResultActivity
,
binding
.
flAd
)
}
else
{
binding
.
flAd
.
visibility
=
View
.
GONE
}
AdmobUtils
.
showNativeAd
(
this
@ResultActivity
,
binding
.
flAd
)
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
...
...
app/src/main/java/com/test/easy/easycleanerjunk/bean/ConfigBean.kt
View file @
34a7f3e1
...
@@ -16,4 +16,6 @@ class ConfigBean() {
...
@@ -16,4 +16,6 @@ class ConfigBean() {
var
timerInterval
:
Int
=
5
var
timerInterval
:
Int
=
5
var
maxMultiClick
:
Int
=
4
var
maxMultiClick
:
Int
=
4
var
naAdS
:
Int
=
0
var
naAdS
:
Int
=
0
var
isShowBackIntAd
:
Int
=
0
var
isShowResultNaAd
:
Int
=
0
}
}
app/src/main/java/com/test/easy/easycleanerjunk/helps/ComUtils.kt
View file @
34a7f3e1
...
@@ -65,6 +65,7 @@ object ComUtils {
...
@@ -65,6 +65,7 @@ object ComUtils {
SPUtils
.
getInstance
().
put
(
"timerDelay"
,
bean
.
timerDelay
)
SPUtils
.
getInstance
().
put
(
"timerDelay"
,
bean
.
timerDelay
)
SPUtils
.
getInstance
().
put
(
"timerInterval"
,
bean
.
timerInterval
)
SPUtils
.
getInstance
().
put
(
"timerInterval"
,
bean
.
timerInterval
)
SPUtils
.
getInstance
().
put
(
"naAdS"
,
bean
.
naAdS
)
SPUtils
.
getInstance
().
put
(
"naAdS"
,
bean
.
naAdS
)
SPUtils
.
getInstance
().
put
(
"isShowBackIntAd"
,
bean
.
isShowBackIntAd
)
adDisplayInterval
=
bean
.
adInterval
adDisplayInterval
=
bean
.
adInterval
maxMultiClick
=
bean
.
maxMultiClick
maxMultiClick
=
bean
.
maxMultiClick
AdDisplayUtils
.
getInstance
().
setMaxAdDisplayCount
(
bean
.
adShowCount
)
AdDisplayUtils
.
getInstance
().
setMaxAdDisplayCount
(
bean
.
adShowCount
)
...
...
app/src/main/java/com/test/easy/easycleanerjunk/view/DialogViews.kt
View file @
34a7f3e1
package
com.test.easy.easycleanerjunk.view
package
com.test.easy.easycleanerjunk.view
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Context
import
android.content.Context
import
android.graphics.Color
import
android.graphics.Color
...
@@ -102,6 +103,13 @@ object DialogViews {
...
@@ -102,6 +103,13 @@ object DialogViews {
@SuppressLint
(
"SetTextI18n"
)
@SuppressLint
(
"SetTextI18n"
)
fun
Context
.
showDialogFunctionExit
(
function
:
String
,
okAction
:
()
->
Unit
)
{
fun
Context
.
showDialogFunctionExit
(
function
:
String
,
okAction
:
()
->
Unit
)
{
val
s
=
SPUtils
.
getInstance
().
getInt
(
"isShowBackIntAd"
,
0
)
if
(
s
==
0
)
{
if
(
this
is
Activity
){
this
.
finish
()
}
return
}
val
desc
=
when
(
function
)
{
val
desc
=
when
(
function
)
{
JUNK_CLEANER
->
"Exit Junk Cleaner? Unremoved junk files may be taking up space."
JUNK_CLEANER
->
"Exit Junk Cleaner? Unremoved junk files may be taking up space."
LARGE_FILE_CLEANER
->
"Exit Big File Cleaner? Unremoved big files may be taking up space."
LARGE_FILE_CLEANER
->
"Exit Big File Cleaner? Unremoved big files may be taking up space."
...
...
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