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
a15ae477
Commit
a15ae477
authored
Jul 25, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
9dfff531
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
473 additions
and
3 deletions
+473
-3
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+21
-3
data.json
app/src/main/assets/app_manager/data.json
+1
-0
img_0.png
app/src/main/assets/app_manager/images/img_0.png
+0
-0
img_1.png
app/src/main/assets/app_manager/images/img_1.png
+0
-0
img_2.png
app/src/main/assets/app_manager/images/img_2.png
+0
-0
AppManagerActivity.kt
...se/datarecovery/activity/appmanager/AppManagerActivity.kt
+86
-0
AppManagerAnimationActivity.kt
...covery/activity/appmanager/AppManagerAnimationActivity.kt
+54
-0
AppManagerAdapter.kt
...n/java/com/base/datarecovery/adapter/AppManagerAdapter.kt
+47
-0
AppBean.kt
app/src/main/java/com/base/datarecovery/bean/AppBean.kt
+7
-0
HomeFragment.kt
.../main/java/com/base/datarecovery/fragment/HomeFragment.kt
+5
-0
bg_d9e2fd_15.xml
app/src/main/res/drawable/bg_d9e2fd_15.xml
+5
-0
shape_ram_pb.xml
app/src/main/res/drawable/shape_ram_pb.xml
+25
-0
activity_app_manager.xml
app/src/main/res/layout/activity_app_manager.xml
+128
-0
activity_app_manager_animation.xml
app/src/main/res/layout/activity_app_manager_animation.xml
+54
-0
item_app_manager.xml
app/src/main/res/layout/item_app_manager.xml
+40
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
a15ae477
...
@@ -14,6 +14,15 @@
...
@@ -14,6 +14,15 @@
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<uses-permission
android:name=
"android.permission.REQUEST_DELETE_PACKAGES"
/>
<uses-permission
android:name=
"android.permission.REQUEST_DELETE_PACKAGES"
/>
<queries>
<intent>
<action
android:name=
"android.intent.action.MAIN"
/>
</intent>
<intent>
<action
android:name=
"android.intent.action.VIEW"
/>
</intent>
</queries>
<application
<application
android:name=
".MyApplication"
android:name=
".MyApplication"
android:allowBackup=
"true"
android:allowBackup=
"true"
...
@@ -26,7 +35,6 @@
...
@@ -26,7 +35,6 @@
android:theme=
"@style/Theme.DataRecovery"
android:theme=
"@style/Theme.DataRecovery"
tools:targetApi=
"34"
>
tools:targetApi=
"34"
>
<activity
<activity
android:name=
".activity.SplashActivity"
android:name=
".activity.SplashActivity"
android:exported=
"true"
android:exported=
"true"
...
@@ -38,6 +46,18 @@
...
@@ -38,6 +46,18 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".activity.appmanager.AppManagerAnimationActivity"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
android:name=
".activity.appmanager.AppManagerActivity"
android:exported=
"false"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".activity.photomanager.PhotoManagerActivity"
android:name=
".activity.photomanager.PhotoManagerActivity"
android:exported=
"false"
android:exported=
"false"
...
@@ -68,7 +88,6 @@
...
@@ -68,7 +88,6 @@
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".activity.SettingActivity"
android:name=
".activity.SettingActivity"
android:exported=
"false"
android:exported=
"false"
...
@@ -94,7 +113,6 @@
...
@@ -94,7 +113,6 @@
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
tools:ignore=
"DiscouragedApi,LockedOrientationActivity"
/>
<activity
<activity
android:name=
".activity.junkclean.CleanJunkActivity"
android:name=
".activity.junkclean.CleanJunkActivity"
android:exported=
"false"
android:exported=
"false"
...
...
app/src/main/assets/app_manager/data.json
0 → 100644
View file @
a15ae477
{
"v"
:
"5.4.4"
,
"fr"
:
60
,
"ip"
:
0
,
"op"
:
240
,
"w"
:
720
,
"h"
:
1280
,
"nm"
:
"2a"
,
"ddd"
:
0
,
"assets"
:[{
"id"
:
"image_0"
,
"w"
:
498
,
"h"
:
497
,
"u"
:
"images/"
,
"p"
:
"img_0.png"
,
"e"
:
0
},{
"id"
:
"image_1"
,
"w"
:
498
,
"h"
:
251
,
"u"
:
"images/"
,
"p"
:
"img_1.png"
,
"e"
:
0
},{
"id"
:
"image_2"
,
"w"
:
512
,
"h"
:
497
,
"u"
:
"images/"
,
"p"
:
"img_2.png"
,
"e"
:
0
},{
"id"
:
"comp_0"
,
"layers"
:[{
"ddd"
:
0
,
"ind"
:
1
,
"ty"
:
2
,
"nm"
:
"scan.png"
,
"cl"
:
"png"
,
"refId"
:
"image_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
0
,
"s"
:[
30
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0
]},
"t"
:
15
,
"s"
:[
100
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.833
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.167
],
"y"
:[
0
]},
"t"
:
222
,
"s"
:[
100
],
"e"
:[
0
]},{
"t"
:
239
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
360
,
552
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
249
,
248.5
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.667
,
0.667
,
0.667
],
"y"
:[
0.731
,
0.731
,
-28.047
]},
"o"
:{
"x"
:[
0.333
,
0.333
,
0.333
],
"y"
:[
0
,
0
,
0
]},
"t"
:
0
,
"s"
:[
0
,
0
,
100
],
"e"
:[
108
,
108
,
100
]},{
"i"
:{
"x"
:[
0.667
,
0.667
,
0.667
],
"y"
:[
0.52
,
0.52
,
3.935
]},
"o"
:{
"x"
:[
0.333
,
0.333
,
0.333
],
"y"
:[
-0.88
,
-0.88
,
10.562
]},
"t"
:
11
,
"s"
:[
108
,
108
,
100
],
"e"
:[
96
,
96
,
100
]},{
"i"
:{
"x"
:[
0.667
,
0.667
,
0.667
],
"y"
:[
1
,
1
,
1
]},
"o"
:{
"x"
:[
0.333
,
0.333
,
0.333
],
"y"
:[
-1.081
,
-1.081
,
-2.202
]},
"t"
:
15
,
"s"
:[
96
,
96
,
100
],
"e"
:[
100
,
100
,
100
]},{
"t"
:
18
}],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
2
,
"ty"
:
2
,
"nm"
:
"sm.png"
,
"cl"
:
"png"
,
"refId"
:
"image_1"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
17
,
"s"
:[
0
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
32
,
"s"
:[
100
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
47
,
"s"
:[
0
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
64
,
"s"
:[
100
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
81
,
"s"
:[
0
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
96
,
"s"
:[
0
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
111
,
"s"
:[
100
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
126
,
"s"
:[
0
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
143
,
"s"
:[
100
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
160
,
"s"
:[
0
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
175
,
"s"
:[
0
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
190
,
"s"
:[
100
],
"e"
:[
0
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
205
,
"s"
:[
0
],
"e"
:[
100
]},{
"i"
:{
"x"
:[
0.667
],
"y"
:[
1
]},
"o"
:{
"x"
:[
0.333
],
"y"
:[
0
]},
"t"
:
222
,
"s"
:[
100
],
"e"
:[
0
]},{
"t"
:
239
}],
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
1
,
"k"
:[{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
17
,
"s"
:[
360
,
432
,
0
],
"e"
:[
360
,
912
,
0
],
"to"
:[
0
,
80
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
47
,
"s"
:[
360
,
912
,
0
],
"e"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
80
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
0.667
},
"o"
:{
"x"
:
0.333
,
"y"
:
0.333
},
"t"
:
81
,
"s"
:[
360
,
432
,
0
],
"e"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
96
,
"s"
:[
360
,
432
,
0
],
"e"
:[
360
,
912
,
0
],
"to"
:[
0
,
80
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
126
,
"s"
:[
360
,
912
,
0
],
"e"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
80
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
0.667
},
"o"
:{
"x"
:
0.333
,
"y"
:
0.333
},
"t"
:
160
,
"s"
:[
360
,
432
,
0
],
"e"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
175
,
"s"
:[
360
,
432
,
0
],
"e"
:[
360
,
912
,
0
],
"to"
:[
0
,
80
,
0
],
"ti"
:[
0
,
0
,
0
]},{
"i"
:{
"x"
:
0.667
,
"y"
:
1
},
"o"
:{
"x"
:
0.333
,
"y"
:
0
},
"t"
:
205
,
"s"
:[
360
,
912
,
0
],
"e"
:[
360
,
432
,
0
],
"to"
:[
0
,
0
,
0
],
"ti"
:[
0
,
80
,
0
]},{
"t"
:
239
}],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
249
,
125.5
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
}]}],
"layers"
:[{
"ddd"
:
0
,
"ind"
:
1
,
"ty"
:
0
,
"nm"
:
"scan"
,
"refId"
:
"comp_0"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
360
,
640
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
360
,
640
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"w"
:
720
,
"h"
:
1280
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
},{
"ddd"
:
0
,
"ind"
:
2
,
"ty"
:
2
,
"nm"
:
"2-phone.png"
,
"cl"
:
"png"
,
"refId"
:
"image_2"
,
"sr"
:
1
,
"ks"
:{
"o"
:{
"a"
:
0
,
"k"
:
100
,
"ix"
:
11
},
"r"
:{
"a"
:
0
,
"k"
:
0
,
"ix"
:
10
},
"p"
:{
"a"
:
0
,
"k"
:[
360
,
552
,
0
],
"ix"
:
2
},
"a"
:{
"a"
:
0
,
"k"
:[
256
,
248.5
,
0
],
"ix"
:
1
},
"s"
:{
"a"
:
0
,
"k"
:[
100
,
100
,
100
],
"ix"
:
6
}},
"ao"
:
0
,
"ip"
:
0
,
"op"
:
720
,
"st"
:
0
,
"bm"
:
0
}],
"markers"
:[]}
\ No newline at end of file
app/src/main/assets/app_manager/images/img_0.png
0 → 100644
View file @
a15ae477
3.07 KB
app/src/main/assets/app_manager/images/img_1.png
0 → 100644
View file @
a15ae477
11.1 KB
app/src/main/assets/app_manager/images/img_2.png
0 → 100644
View file @
a15ae477
80.9 KB
app/src/main/java/com/base/datarecovery/activity/appmanager/AppManagerActivity.kt
0 → 100644
View file @
a15ae477
package
com.base.datarecovery.activity.appmanager
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.pm.ApplicationInfo
import
android.content.pm.PackageInfo
import
android.graphics.Color
import
android.os.Bundle
import
androidx.activity.enableEdgeToEdge
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.view.ViewCompat
import
androidx.core.view.WindowInsetsCompat
import
androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.R
import
com.base.datarecovery.adapter.AppManagerAdapter
import
com.base.datarecovery.bean.AppBean
import
com.base.datarecovery.databinding.ActivityAppManagerBinding
import
com.base.datarecovery.help.BaseActivity
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.launch
class
AppManagerActivity
:
BaseActivity
<
ActivityAppManagerBinding
>()
{
override
val
binding
:
ActivityAppManagerBinding
by
lazy
{
ActivityAppManagerBinding
.
inflate
(
layoutInflater
)
}
private
lateinit
var
adapter
:
AppManagerAdapter
override
fun
initView
()
{
BarUtils
.
setStatusBarLightMode
(
this
,
true
)
BarUtils
.
setStatusBarColor
(
this
,
Color
.
TRANSPARENT
)
binding
.
root
.
updatePadding
(
top
=
BarUtils
.
getStatusBarHeight
())
adapter
=
AppManagerAdapter
{
}
binding
.
rv
.
adapter
=
adapter
if
(!
checkStorePermission
())
{
showGerPermission
(
null
,
deny
=
{},
allow
=
{
requestStorePermission
(
launcher
)
{
if
(
it
)
initData
()
else
finishToMain
()
}
})
}
else
{
initData
()
}
}
@SuppressLint
(
"QueryPermissionsNeeded"
)
private
fun
initData
()
=
lifecycleScope
.
launch
(
Dispatchers
.
IO
)
{
val
pm
=
packageManager
val
packages
=
pm
.
getInstalledPackages
(
0
)
val
list
=
arrayListOf
<
AppBean
>()
packages
.
forEach
{
app
->
if
(
isLaunchApp
(
this
@AppManagerActivity
,
app
))
{
val
appBean
=
AppBean
(
app
.
applicationInfo
.
loadIcon
(
pm
),
app
.
applicationInfo
.
loadLabel
(
pm
).
toString
(),
app
.
applicationInfo
.
packageName
)
list
.
add
(
appBean
)
}
}
launch
(
Dispatchers
.
Main
)
{
adapter
.
setData
(
list
)
}
}
private
fun
isLaunchApp
(
context
:
Context
,
app
:
PackageInfo
,
filterSystem
:
Boolean
=
true
):
Boolean
{
val
flagSystem
=
(
app
.
applicationInfo
.
flags
and
ApplicationInfo
.
FLAG_SYSTEM
)
<
1
val
flag
=
if
(
filterSystem
)
flagSystem
else
true
return
flag
&&
app
.
applicationInfo
.
packageName
!=
context
.
packageName
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/activity/appmanager/AppManagerAnimationActivity.kt
0 → 100644
View file @
a15ae477
package
com.base.datarecovery.activity.appmanager
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.view.View
import
android.widget.Toast
import
androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
com.base.datarecovery.ads.AdmobMaxHelper
import
com.base.datarecovery.databinding.ActivityAppManagerAnimationBinding
import
com.base.datarecovery.help.BaseActivity
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.launch
import
kotlin.random.Random
class
AppManagerAnimationActivity
:
BaseActivity
<
ActivityAppManagerAnimationBinding
>()
{
override
val
binding
:
ActivityAppManagerAnimationBinding
by
lazy
{
ActivityAppManagerAnimationBinding
.
inflate
(
layoutInflater
)
}
override
fun
initView
()
{
playLottie
()
}
override
fun
initListener
()
{
onBackPressedDispatcher
.
addCallback
{
Toast
.
makeText
(
this
@AppManagerAnimationActivity
,
"wait a moment"
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
@SuppressLint
(
"SetTextI18n"
)
private
fun
playLottie
()
{
binding
.
lottie
.
imageAssetsFolder
=
"app_manager/images/"
binding
.
lottie
.
setAnimation
(
"app_manager/data.json"
)
binding
.
lottie
.
playAnimation
()
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
delay
(
Random
.
nextLong
(
4000
,
6000
))
binding
.
lottie
.
visibility
=
View
.
GONE
binding
.
lottieCompleted
.
visibility
=
View
.
VISIBLE
binding
.
lottieCompleted
.
playAnimation
()
binding
.
tv
.
text
=
"Completed!"
delay
(
1000
)
AdmobMaxHelper
.
admobMaxShowInterstitialAd
(
this
@AppManagerAnimationActivity
){
startActivity
(
Intent
(
this
@AppManagerAnimationActivity
,
AppManagerActivity
::
class
.
java
))
finish
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/adapter/AppManagerAdapter.kt
0 → 100644
View file @
a15ae477
package
com.base.datarecovery.adapter
import
android.annotation.SuppressLint
import
android.view.View
import
android.view.ViewGroup
import
androidx.recyclerview.widget.RecyclerView
import
com.base.datarecovery.R
import
com.base.datarecovery.bean.AppBean
import
com.base.datarecovery.databinding.ItemAppManagerBinding
import
com.base.datarecovery.view.XmlEx.inflate
class
AppManagerAdapter
(
val
click
:(
packageName
:
String
)->
Unit
):
RecyclerView
.
Adapter
<
AppManagerAdapter
.
AAA
>()
{
private
val
beanList
=
arrayListOf
<
AppBean
>()
class
AAA
(
view
:
View
)
:
RecyclerView
.
ViewHolder
(
view
)
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
AAA
{
return
AAA
(
R
.
layout
.
item_app_manager
.
inflate
(
parent
))
}
override
fun
getItemCount
():
Int
{
return
beanList
.
size
}
override
fun
onBindViewHolder
(
holder
:
AAA
,
position
:
Int
)
{
val
binding
=
ItemAppManagerBinding
.
bind
(
holder
.
itemView
)
val
bean
=
beanList
[
position
]
binding
.
iv
.
setImageDrawable
(
bean
.
icon
)
binding
.
tvName
.
text
=
bean
.
name
binding
.
tvStop
.
setOnClickListener
{
click
.
invoke
(
bean
.
packageName
)
}
}
@SuppressLint
(
"NotifyDataSetChanged"
)
fun
setData
(
list
:
List
<
AppBean
>)
{
beanList
.
clear
()
beanList
.
addAll
(
list
)
notifyDataSetChanged
()
}
@SuppressLint
(
"NotifyDataSetChanged"
)
fun
removeBean
(
pkg
:
String
)
{
beanList
.
removeIf
{
it
.
packageName
==
pkg
}
notifyDataSetChanged
()
}
}
\ No newline at end of file
app/src/main/java/com/base/datarecovery/bean/AppBean.kt
0 → 100644
View file @
a15ae477
package
com.base.datarecovery.bean
import
android.graphics.drawable.Drawable
class
AppBean
(
val
icon
:
Drawable
,
val
name
:
String
,
val
packageName
:
String
)
\ No newline at end of file
app/src/main/java/com/base/datarecovery/fragment/HomeFragment.kt
View file @
a15ae477
...
@@ -8,6 +8,8 @@ import android.view.View
...
@@ -8,6 +8,8 @@ import android.view.View
import
android.view.animation.AccelerateDecelerateInterpolator
import
android.view.animation.AccelerateDecelerateInterpolator
import
com.base.datarecovery.activity.MainActivity
import
com.base.datarecovery.activity.MainActivity
import
com.base.datarecovery.activity.SettingActivity
import
com.base.datarecovery.activity.SettingActivity
import
com.base.datarecovery.activity.appmanager.AppManagerActivity
import
com.base.datarecovery.activity.appmanager.AppManagerAnimationActivity
import
com.base.datarecovery.activity.junkclean.ScanJunkActivity
import
com.base.datarecovery.activity.junkclean.ScanJunkActivity
import
com.base.datarecovery.activity.photomanager.PhotoManagerAnimationActivity
import
com.base.datarecovery.activity.photomanager.PhotoManagerAnimationActivity
import
com.base.datarecovery.activity.privacyspace.PrivacyPinOneActivity
import
com.base.datarecovery.activity.privacyspace.PrivacyPinOneActivity
...
@@ -71,6 +73,9 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
...
@@ -71,6 +73,9 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding
.
cardWhatsApp
.
setOnClickListener
{
binding
.
cardWhatsApp
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
WhatsAppCleanerAnimationActivity
::
class
.
java
))
startActivity
(
Intent
(
requireContext
(),
WhatsAppCleanerAnimationActivity
::
class
.
java
))
}
}
binding
.
cardAppManager
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
AppManagerAnimationActivity
::
class
.
java
))
}
binding
.
flSetting
.
setOnClickListener
{
binding
.
flSetting
.
setOnClickListener
{
startActivity
(
Intent
(
requireContext
(),
SettingActivity
::
class
.
java
))
startActivity
(
Intent
(
requireContext
(),
SettingActivity
::
class
.
java
))
...
...
app/src/main/res/drawable/bg_d9e2fd_15.xml
0 → 100644
View file @
a15ae477
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#D9E2FD"
/>
<corners
android:radius=
"15dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/shape_ram_pb.xml
0 → 100644
View file @
a15ae477
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
>
<shape>
<!-- <stroke-->
<!-- android:width="1px"-->
<!-- android:color="#FF3835" />-->
<solid
android:color=
"#E4EAFF"
/>
<corners
android:radius=
"12.5dp"
/>
</shape>
</item>
<!-- android:bottom="3dp"-->
<!-- android:end="3dp"-->
<!-- android:start="3dp"-->
<!-- android:top="3dp"-->
<item
android:id=
"@android:id/progress"
>
<scale
android:scaleWidth=
"100%"
>
<shape>
<corners
android:radius=
"12.5dp"
/>
<solid
android:color=
"#4772FD"
/>
</shape>
</scale>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/layout/activity_app_manager.xml
0 → 100644
View file @
a15ae477
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".activity.appmanager.AppManagerActivity"
>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:ignore=
"UselessParent"
>
<FrameLayout
android:id=
"@+id/fl_fanhui"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"20dp"
tools:ignore=
"UselessParent"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/quit"
tools:ignore=
"ContentDescription"
/>
</FrameLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:text=
"App Manager"
android:textSize=
"19sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
</FrameLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"20dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_percent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:includeFontPadding=
"false"
android:textSize=
"54sp"
android:textStyle=
"bold"
tools:text=
"68"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_marginStart=
"2dp"
android:layout_marginBottom=
"5dp"
android:includeFontPadding=
"false"
android:text=
"%"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"16dp"
android:text=
"RAM Used"
android:textSize=
"15sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"18dp"
>
<ProgressBar
android:id=
"@+id/pb_ram"
style=
"@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width=
"345dp"
android:layout_height=
"25dp"
android:max=
"100"
android:progressDrawable=
"@drawable/shape_ram_pb"
tools:progress=
"50"
/>
<TextView
android:id=
"@+id/tv_size"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical|end"
android:layout_marginEnd=
"20dp"
android:text=
"5.6GB/7.9GB"
android:textSize=
"12sp"
android:textStyle=
"bold"
tools:ignore=
"HardcodedText"
/>
</FrameLayout>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"25dp"
android:text=
"Manager user apps"
android:textColor=
"#999999"
android:textSize=
"15sp"
tools:ignore=
"HardcodedText"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem=
"@layout/item_app_manager"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/activity_app_manager_animation.xml
0 → 100644
View file @
a15ae477
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
tools:context=
".activity.appmanager.AppManagerAnimationActivity"
>
<com.base.datarecovery.view.XmlLottieAnimationView
android:id=
"@+id/lottie"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:adjustViewBounds=
"true"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
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:layout_constraintBottom_toTopOf=
"@id/tv"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:lottie_autoPlay=
"false"
app:lottie_rawRes=
"@raw/loading_completed"
/>
<TextView
android:id=
"@+id/tv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal|bottom"
android:layout_marginBottom=
"250dp"
android:text=
"Wait a moment..."
android:textColor=
"#333333"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
tools:ignore=
"HardcodedText"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_app_manager.xml
0 → 100644
View file @
a15ae477
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"18dp"
android:layout_marginVertical=
"12.5dp"
>
<ImageView
android:id=
"@+id/iv"
android:layout_width=
"38dp"
android:layout_height=
"38dp"
android:layout_gravity=
"center_vertical"
tools:ignore=
"ContentDescription"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginHorizontal=
"10dp"
android:layout_weight=
"1"
android:ellipsize=
"middle"
android:singleLine=
"true"
android:textColor=
"@color/black"
android:textSize=
"15sp"
tools:text=
"Google Play Store"
/>
<TextView
android:id=
"@+id/tv_stop"
android:layout_width=
"80dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center_vertical"
android:background=
"@drawable/bg_d9e2fd_15"
android:gravity=
"center"
android:text=
"Stop"
android:textColor=
"#4773FF"
android:textSize=
"14sp"
tools:ignore=
"HardcodedText"
/>
</LinearLayout>
\ 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