Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Data Recovery White
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
Data Recovery White
Commits
3f54f403
Commit
3f54f403
authored
Jul 18, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
fdd79655
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
45 deletions
+63
-45
MyApplication.kt
app/src/main/java/com/base/datarecovery/MyApplication.kt
+1
-1
SplashActivity.kt
...ain/java/com/base/datarecovery/activity/SplashActivity.kt
+5
-20
ScanJunkActivity.kt
.../base/datarecovery/activity/junkclean/ScanJunkActivity.kt
+29
-18
AdmobMaxHelper.kt
...src/main/java/com/base/datarecovery/ads/AdmobMaxHelper.kt
+3
-3
AdmobOpenUtils.kt
...in/java/com/base/datarecovery/ads/admob/AdmobOpenUtils.kt
+2
-1
activity_layout_scan_junk.xml
app/src/main/res/layout/activity_layout_scan_junk.xml
+22
-2
loading_completed.json
app/src/main/res/raw/loading_completed.json
+1
-0
No files found.
app/src/main/java/com/base/datarecovery/MyApplication.kt
View file @
3f54f403
...
...
@@ -118,7 +118,7 @@ class MyApplication : BaseApplication() {
if
(
flag
)
{
if
(
AdmobMaxHelper
.
isOpenAdLoaded
())
{
LogEx
.
logDebug
(
TAG
,
"show ad"
)
AdmobMaxHelper
.
admobMaxShowOpenAd
(
activity
)
AdmobMaxHelper
.
admobMaxShowOpenAd
(
activity
,
{},
{}
)
}
else
{
LogEx
.
logDebug
(
TAG
,
"jump splash"
)
topActivity
?.
startActivity
(
...
...
app/src/main/java/com/base/datarecovery/activity/SplashActivity.kt
View file @
3f54f403
...
...
@@ -246,27 +246,12 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>() {
private
fun
outTimeAd
()
{
LogEx
.
logDebug
(
TAG
,
"outTimeAd"
)
if
(
ConfigHelper
.
admobTrueMaxFlase
)
{
AdmobOpenUtils
.
loadAppOpenAd
{
LogEx
.
logDebug
(
TAG
,
"load where=$it"
)
job
?.
cancel
()
AdmobOpenUtils
.
showAppOpenAd
(
this
@SplashActivity
)
{
LogEx
.
logDebug
(
TAG
,
"adCallBack=$it"
)
binding
.
pb
.
progress
=
100
jumpNext
()
}
}
}
else
{
AdMaxOpenUtils
.
showAppOpenAd
(
this
@SplashActivity
,
loaded
=
{
job
?.
cancel
()
},
onHidden
=
{
binding
.
pb
.
progress
=
100
jumpNext
()
})
AdmobMaxHelper
.
admobMaxShowOpenAd
(
this
,
showBeforeAction
=
{
job
?.
cancel
()
})
{
binding
.
pb
.
progress
=
100
jumpNext
()
}
}
override
fun
onResume
()
{
...
...
app/src/main/java/com/base/datarecovery/activity/junkclean/ScanJunkActivity.kt
View file @
3f54f403
package
com.base.datarecovery.activity.junkclean
import
android.animation.ValueAnimator
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.graphics.Color
import
android.view.View
import
android.view.animation.LinearInterpolator
import
android.widget.Toast
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.ads.AdmobMaxHelper.admobMaxShowInterstitialAd
import
com.base.datarecovery.databinding.ActivityLayoutScanJunkBinding
import
com.base.datarecovery.help.BaseActivity
...
...
@@ -14,6 +18,9 @@ import com.base.datarecovery.help.PermissionHelp.checkStorePermission
import
com.base.datarecovery.help.PermissionHelp.requestStorePermission
import
com.base.datarecovery.utils.BarUtils
import
com.base.datarecovery.view.DialogViews.showGerPermission
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
/**
* 清理动画页面
...
...
@@ -24,6 +31,7 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
ActivityLayoutScanJunkBinding
.
inflate
(
layoutInflater
)
}
private
var
onResumePlay
:
Boolean
=
false
override
fun
initView
()
{
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
...
...
@@ -37,7 +45,7 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
allow
=
{
requestStorePermission
(
launcher
,
result
=
{
if
(
it
)
{
playLottie
(
false
)
onResumePlay
=
true
}
else
{
finishToMain
()
}
...
...
@@ -47,6 +55,7 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
}
}
override
fun
initListener
()
{
onBackPressedDispatcher
.
addCallback
{
...
...
@@ -57,6 +66,9 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
private
var
isPause
=
false
override
fun
onResume
()
{
super
.
onResume
()
if
(
onResumePlay
)
{
playLottie
()
}
if
(
isPause
)
{
binding
.
idJunkScan
.
resumeAnimation
()
}
...
...
@@ -80,7 +92,8 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
binding
.
idJunkScan
.
pauseAnimation
()
}
private
fun
playLottie
(
showAd
:
Boolean
=
true
)
{
@SuppressLint
(
"SetTextI18n"
)
private
fun
playLottie
()
{
val
a1
=
ValueAnimator
.
ofFloat
(
0f
,
360f
)
a1
.
run
{
duration
=
1000
...
...
@@ -118,24 +131,22 @@ class ScanJunkActivity : BaseActivity<ActivityLayoutScanJunkBinding>() {
binding
.
idJunkScan
.
imageAssetsFolder
=
"junk_scan/images/"
binding
.
idJunkScan
.
setAnimation
(
"junk_scan/data.json"
)
binding
.
idJunkScan
.
playAnimation
()
binding
.
root
.
postDelayed
({
if
(
showAd
)
{
admobMaxShowInterstitialAd
(
this
){
a1
.
cancel
()
a2
.
cancel
()
a3
.
cancel
()
startActivity
(
Intent
(
this
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
else
{
a1
.
cancel
()
a2
.
cancel
()
a3
.
cancel
()
startActivity
(
Intent
(
this
,
CleanJunkActivity
::
class
.
java
))
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
delay
(
5000
)
binding
.
lottie
.
visibility
=
View
.
GONE
binding
.
lottieCompleted
.
visibility
=
View
.
VISIBLE
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
a1
.
cancel
()
a2
.
cancel
()
a3
.
cancel
()
delay
(
1000
)
admobMaxShowInterstitialAd
(
this
@ScanJunkActivity
)
{
startActivity
(
Intent
(
this
@ScanJunkActivity
,
CleanJunkActivity
::
class
.
java
))
finish
()
}
}
,
5000
)
}
}
private
var
animator1
:
ValueAnimator
?
=
null
...
...
app/src/main/java/com/base/datarecovery/ads/AdmobMaxHelper.kt
View file @
3f54f403
...
...
@@ -36,13 +36,13 @@ object AdmobMaxHelper {
}
}
fun
admobMaxShowOpenAd
(
activity
:
Activity
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
fun
admobMaxShowOpenAd
(
activity
:
Activity
,
showBeforeAction
:
()
->
Unit
,
onHidden
:
(()
->
Unit
)?
=
null
)
{
if
(
ConfigHelper
.
admobTrueMaxFlase
)
{
AdmobOpenUtils
.
showAppOpenAd
(
activity
)
{
AdmobOpenUtils
.
showAppOpenAd
(
activity
,
showBefore
=
showBeforeAction
)
{
onHidden
?.
invoke
()
}
}
else
{
AdMaxOpenUtils
.
showAppOpenAd
(
activity
)
{
AdMaxOpenUtils
.
showAppOpenAd
(
activity
,
loaded
=
showBeforeAction
)
{
onHidden
?.
invoke
()
}
}
...
...
app/src/main/java/com/base/datarecovery/ads/admob/AdmobOpenUtils.kt
View file @
3f54f403
...
...
@@ -66,7 +66,7 @@ object AdmobOpenUtils {
}
fun
showAppOpenAd
(
activity
:
Activity
,
s
kip
:
Boolean
=
false
,
onHidden
:
((
where
:
Int
)
->
Unit
)?
=
null
)
{
fun
showAppOpenAd
(
activity
:
Activity
,
s
howBefore
:
(()
->
Unit
)?
=
null
,
onHidden
:
((
where
:
Int
)
->
Unit
)?
=
null
)
{
if
(
activity
.
isFinishing
||
activity
.
isDestroyed
)
{
return
...
...
@@ -116,6 +116,7 @@ object AdmobOpenUtils {
}
override
fun
onAdShowedFullScreenContent
()
{
showBefore
?.
invoke
()
showAd
(
thisMOpenAd
?.
responseInfo
,
"openAd"
,
activity
)
}
}
...
...
app/src/main/res/layout/activity_layout_scan_junk.xml
View file @
3f54f403
...
...
@@ -27,7 +27,7 @@
</RelativeLayout>
<
com.base.datarecovery.view.XmlLottieAnimationView
<
FrameLayout
android:id=
"@+id/id_junk_scan"
android:layout_width=
"300dp"
android:layout_height=
"300dp"
...
...
@@ -38,7 +38,27 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:lottie_autoPlay=
"true"
app:lottie_loop=
"true"
/>
app:lottie_loop=
"true"
>
<com.base.datarecovery.view.XmlLottieAnimationView
android:id=
"@+id/lottie"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:adjustViewBounds=
"true"
app:lottie_autoPlay=
"true"
app:lottie_loop=
"true"
/>
<com.base.datarecovery.view.XmlLottieAnimationView
android:id=
"@+id/lottie_completed"
android:layout_width=
"90dp"
android:layout_height=
"90dp"
android:layout_gravity=
"center"
android:visibility=
"gone"
app:lottie_autoPlay=
"false"
app:lottie_rawRes=
"@raw/loading_completed"
/>
</FrameLayout>
<TextView
android:id=
"@+id/tv"
...
...
app/src/main/res/raw/loading_completed.json
0 → 100644
View file @
3f54f403
{
"nm"
:
"Success Animation"
,
"ddd"
:
0
,
"h"
:
400
,
"w"
:
400
,
"meta"
:{
"g"
:
"@lottiefiles/toolkit-js 0.33.2"
},
"layers"
:[{
"ty"
:
4
,
"nm"
:
"Success_Tick"
,
"sr"
:
1
,
"st"
:
4.00000016292334
,
"op"
:
154.000006272549
,
"ip"
:
4.00000016292334
,
"hd"
:
false
,
"ddd"
:
0
,
"bm"
:
0
,
"hasMask"
:
false
,
"ao"
:
0
,
"ks"
:{
"a"
:{
"a"
:
0
,
"k"
:[
29
,
-36
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
},
"sk"
:{
"a"
:
0
,
"k"
:
0
},
"p"
:{
"a"
:
0
,
"k"
:[
205.75
,
194.75
,
0
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"sa"
:{
"a"
:
0
,
"k"
:
0
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
}},
"ef"
:[],
"shapes"
:[{
"ty"
:
"gr"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Group"
,
"nm"
:
"Shape 1"
,
"ix"
:
1
,
"cix"
:
2
,
"np"
:
3
,
"it"
:[{
"ty"
:
"sh"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Shape - Group"
,
"nm"
:
"Path 1"
,
"ix"
:
1
,
"d"
:
1
,
"ks"
:{
"a"
:
0
,
"k"
:{
"c"
:
false
,
"i"
:[[
0
,
0
],[
0
,
0
],[
0
,
0
]],
"o"
:[[
0
,
0
],[
0
,
0
],[
0
,
0
]],
"v"
:[[
-48
,
-34
],[
2
,
16
],[
94.5
,
-77.5
]]},
"ix"
:
2
}},{
"ty"
:
"st"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Graphic - Stroke"
,
"nm"
:
"Stroke 1"
,
"lc"
:
2
,
"lj"
:
2
,
"ml"
:
1
,
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
4
},
"w"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.146
,
"y"
:
1
},
"s"
:[
15
],
"t"
:
4
},{
"s"
:[
30
],
"t"
:
25.0000010182709
}],
"ix"
:
5
},
"c"
:{
"a"
:
0
,
"k"
:[
0
,
0.3922
,
0.7882
],
"ix"
:
3
}},{
"ty"
:
"tr"
,
"a"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
],
"ix"
:
3
},
"sk"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
4
},
"p"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
6
},
"sa"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
5
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
7
}}]},{
"ty"
:
"tm"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Filter - Trim"
,
"nm"
:
"Trim Paths 1"
,
"ix"
:
2
,
"e"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.113
,
"y"
:
1
},
"s"
:[
0
],
"t"
:
4
},{
"s"
:[
100
],
"t"
:
25.0000010182709
}],
"ix"
:
2
},
"o"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
3
},
"s"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
1
},
"m"
:
1
}],
"ind"
:
1
},{
"ty"
:
4
,
"nm"
:
"Circle"
,
"sr"
:
1
,
"st"
:
0
,
"op"
:
150.000006109625
,
"ip"
:
0
,
"hd"
:
false
,
"ddd"
:
0
,
"bm"
:
0
,
"hasMask"
:
false
,
"ao"
:
0
,
"ks"
:{
"a"
:{
"a"
:
0
,
"k"
:[
30.765
,
23.931
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
},
"sk"
:{
"a"
:
0
,
"k"
:
0
},
"p"
:{
"a"
:
0
,
"k"
:[
200
,
200
,
0
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"sa"
:{
"a"
:
0
,
"k"
:
0
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
}},
"ef"
:[{
"ty"
:
22
,
"mn"
:
"ADBE Stroke"
,
"nm"
:
"Stroke"
,
"ix"
:
1
,
"en"
:
1
,
"ef"
:[{
"ty"
:
10
,
"mn"
:
"ADBE Stroke-0001"
,
"nm"
:
"Path"
,
"ix"
:
1
,
"v"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
1
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0010"
,
"nm"
:
"All Masks"
,
"ix"
:
2
,
"v"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
2
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0011"
,
"nm"
:
"Stroke Sequentially"
,
"ix"
:
3
,
"v"
:{
"a"
:
0
,
"k"
:
1
,
"ix"
:
3
}},{
"ty"
:
2
,
"mn"
:
"ADBE Stroke-0002"
,
"nm"
:
"Color"
,
"ix"
:
4
,
"v"
:{
"a"
:
0
,
"k"
:[
1
,
1
,
1
],
"ix"
:
4
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0003"
,
"nm"
:
"Brush Size"
,
"ix"
:
5
,
"v"
:{
"a"
:
0
,
"k"
:
2
,
"ix"
:
5
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0004"
,
"nm"
:
"Brush Hardness"
,
"ix"
:
6
,
"v"
:{
"a"
:
0
,
"k"
:
0.75
,
"ix"
:
6
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0005"
,
"nm"
:
"Opacity"
,
"ix"
:
7
,
"v"
:{
"a"
:
0
,
"k"
:
1
,
"ix"
:
7
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0008"
,
"nm"
:
"Start"
,
"ix"
:
8
,
"v"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
8
}},{
"ty"
:
0
,
"mn"
:
"ADBE Stroke-0009"
,
"nm"
:
"End"
,
"ix"
:
9
,
"v"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
9
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0006"
,
"nm"
:
"Spacing"
,
"ix"
:
10
,
"v"
:{
"a"
:
0
,
"k"
:
15
,
"ix"
:
10
}},{
"ty"
:
7
,
"mn"
:
"ADBE Stroke-0007"
,
"nm"
:
"Paint Style"
,
"ix"
:
11
,
"v"
:{
"a"
:
0
,
"k"
:
1
,
"ix"
:
11
}}]}],
"shapes"
:[{
"ty"
:
"gr"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Group"
,
"nm"
:
"Ellipse 1"
,
"ix"
:
1
,
"cix"
:
2
,
"np"
:
3
,
"it"
:[{
"ty"
:
"el"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Shape - Ellipse"
,
"nm"
:
"Ellipse Path 1"
,
"d"
:
1
,
"p"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
3
},
"s"
:{
"a"
:
0
,
"k"
:[
318.933
,
318.933
],
"ix"
:
2
}},{
"ty"
:
"st"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Graphic - Stroke"
,
"nm"
:
"Stroke 1"
,
"lc"
:
2
,
"lj"
:
1
,
"ml"
:
4
,
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
4
},
"w"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.188
,
"y"
:
1
},
"s"
:[
50
],
"t"
:
0
},{
"s"
:[
20
],
"t"
:
20.0000008146167
}],
"ix"
:
5
},
"c"
:{
"a"
:
0
,
"k"
:[
0
,
0.3922
,
0.7882
],
"ix"
:
3
}},{
"ty"
:
"tr"
,
"a"
:{
"a"
:
0
,
"k"
:[
0
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
],
"ix"
:
3
},
"sk"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
4
},
"p"
:{
"a"
:
0
,
"k"
:[
30.765
,
23.931
],
"ix"
:
2
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
6
},
"sa"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
5
},
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
7
}}]},{
"ty"
:
"tm"
,
"bm"
:
0
,
"hd"
:
false
,
"mn"
:
"ADBE Vector Filter - Trim"
,
"nm"
:
"Trim Paths 1"
,
"ix"
:
2
,
"e"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
2
},
"o"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
3
},
"s"
:{
"a"
:
1
,
"k"
:[{
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"i"
:{
"x"
:
0.096
,
"y"
:
1
},
"s"
:[
100
],
"t"
:
0
},{
"s"
:[
0
],
"t"
:
20.0000008146167
}],
"ix"
:
1
},
"m"
:
1
}],
"ind"
:
2
}],
"v"
:
"5.7.4"
,
"fr"
:
29.9700012207031
,
"op"
:
30.0000012219251
,
"ip"
:
0
,
"assets"
:[]}
\ 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