Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
F
File Recovery RecycleBin
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
File Recovery RecycleBin
Commits
4ef31f4f
Commit
4ef31f4f
authored
Jul 29, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
c7f8c090
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
33 deletions
+37
-33
MainActivity.kt
.../com/base/filerecoveryrecyclebin/activity/MainActivity.kt
+2
-2
CleanJunkActivity.kt
...ecoveryrecyclebin/activity/junkclean/CleanJunkActivity.kt
+21
-21
JunkExpandAdapter.kt
.../base/filerecoveryrecyclebin/adapter/JunkExpandAdapter.kt
+14
-9
HomeFragment.kt
.../com/base/filerecoveryrecyclebin/fragment/HomeFragment.kt
+0
-1
No files found.
app/src/main/java/com/base/filerecoveryrecyclebin/activity/MainActivity.kt
View file @
4ef31f4f
...
@@ -63,11 +63,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
...
@@ -63,11 +63,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
if
(!
checkStorePermission
())
{
if
(!
checkStorePermission
())
{
if
(
dialog
==
null
)
{
if
(
dialog
==
null
)
{
dialog
=
showPermissionBottomSheet
(
launcher
)
{
dialog
=
showPermissionBottomSheet
(
launcher
)
{
AdmobBannerUtils
.
showCollapsibleBannerAd
(
this
,
binding
.
flBanner
)
//
AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner)
}
}
}
}
}
else
{
}
else
{
AdmobBannerUtils
.
showCollapsibleBannerAd
(
this
,
binding
.
flBanner
)
//
AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner)
}
}
binding
.
viewpager2
.
run
{
binding
.
viewpager2
.
run
{
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/activity/junkclean/CleanJunkActivity.kt
View file @
4ef31f4f
...
@@ -161,13 +161,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
...
@@ -161,13 +161,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize
+=
l
.
size
totalSize
+=
l
.
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
apk
,
l
.
name
,
l
.
path
,
l
.
size
))
list
.
add
(
ChildBean
(
R
.
mipmap
.
apk
,
l
.
name
,
l
.
path
,
l
.
size
))
}
}
if
(
BuildConfig
.
DEBUG
)
{
//
if (BuildConfig.DEBUG) {
repeat
(
5
)
{
//
repeat(5) {
val
size
=
Random
.
nextLong
(
500
)
//
val size = Random.nextLong(500)
totalSize
+=
size
//
totalSize += size
list
.
add
(
ChildBean
(
R
.
mipmap
.
apk
,
"1"
,
"apl$it"
,
size
))
//
list.add(ChildBean(R.mipmap.apk, "1", "apl$it", size))
}
//
}
}
//
}
delay
(
Random
.
nextLong
(
1500
,
2000
))
delay
(
Random
.
nextLong
(
1500
,
2000
))
}.
await
()
}.
await
()
junkExpandAdapter
.
addChildData
(
1
,
list
)
junkExpandAdapter
.
addChildData
(
1
,
list
)
...
@@ -180,13 +180,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
...
@@ -180,13 +180,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize
+=
l
.
size
totalSize
+=
l
.
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
temp_clean
,
l
.
name
,
l
.
path
,
l
.
size
))
list
.
add
(
ChildBean
(
R
.
mipmap
.
temp_clean
,
l
.
name
,
l
.
path
,
l
.
size
))
}
}
if
(
BuildConfig
.
DEBUG
)
{
//
if (BuildConfig.DEBUG) {
repeat
(
5
)
{
//
repeat(5) {
val
size
=
Random
.
nextLong
(
500
)
//
val size = Random.nextLong(500)
totalSize
+=
size
//
totalSize += size
list
.
add
(
ChildBean
(
R
.
mipmap
.
temp_clean
,
"1"
,
"temp$it"
,
size
))
//
list.add(ChildBean(R.mipmap.temp_clean, "1", "temp$it", size))
}
//
}
}
//
}
delay
(
Random
.
nextLong
(
1500
,
2000
))
delay
(
Random
.
nextLong
(
1500
,
2000
))
}.
await
()
}.
await
()
junkExpandAdapter
.
addChildData
(
2
,
list
)
junkExpandAdapter
.
addChildData
(
2
,
list
)
...
@@ -198,13 +198,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
...
@@ -198,13 +198,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize
+=
l
.
size
totalSize
+=
l
.
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
log_clean
,
l
.
name
,
l
.
path
,
l
.
size
))
list
.
add
(
ChildBean
(
R
.
mipmap
.
log_clean
,
l
.
name
,
l
.
path
,
l
.
size
))
}
}
if
(
BuildConfig
.
DEBUG
)
{
//
if (BuildConfig.DEBUG) {
repeat
(
5
)
{
//
repeat(5) {
val
size
=
Random
.
nextLong
(
500
)
//
val size = Random.nextLong(500)
totalSize
+=
size
//
totalSize += size
list
.
add
(
ChildBean
(
R
.
mipmap
.
log_clean
,
"1"
,
"log$it"
,
size
))
//
list.add(ChildBean(R.mipmap.log_clean, "1", "log$it", size))
}
//
}
}
//
}
delay
(
Random
.
nextLong
(
1500
,
2000
))
delay
(
Random
.
nextLong
(
1500
,
2000
))
}.
await
()
}.
await
()
junkExpandAdapter
.
addChildData
(
3
,
list
)
junkExpandAdapter
.
addChildData
(
3
,
list
)
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/adapter/JunkExpandAdapter.kt
View file @
4ef31f4f
...
@@ -90,11 +90,14 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
...
@@ -90,11 +90,14 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
viewHolder
.
binding
.
idTypeSize
.
text
=
parentBean
.
parentSize
.
toFormatSize
(
1
)
viewHolder
.
binding
.
idTypeSize
.
text
=
parentBean
.
parentSize
.
toFormatSize
(
1
)
}
}
viewHolder
.
binding
.
idXiala
.
isVisible
=
parentBean
.
childItem
.
isNotEmpty
()
viewHolder
.
binding
.
idXiala
.
isVisible
=
true
viewHolder
.
binding
.
idImgChoose
.
isSelected
=
parentBean
.
isParentSelected
viewHolder
.
binding
.
idImgChoose
.
isSelected
=
parentBean
.
isParentSelected
bindParentAnimation
(
parentBean
,
groupPosition
,
viewHolder
)
bindParentAnimation
(
parentBean
,
groupPosition
,
viewHolder
)
if
(
parentBean
.
childItem
.
isEmpty
())
{
viewHolder
.
binding
.
idImgChoose
.
setOnClickListener
{
}
}
else
{
viewHolder
.
binding
.
idImgChoose
.
setOnClickListener
{
viewHolder
.
binding
.
idImgChoose
.
setOnClickListener
{
viewHolder
.
binding
.
idImgChoose
.
isSelected
=
!
viewHolder
.
binding
.
idImgChoose
.
isSelected
viewHolder
.
binding
.
idImgChoose
.
isSelected
=
!
viewHolder
.
binding
.
idImgChoose
.
isSelected
parentBean
.
isParentSelected
=
viewHolder
.
binding
.
idImgChoose
.
isSelected
parentBean
.
isParentSelected
=
viewHolder
.
binding
.
idImgChoose
.
isSelected
...
@@ -108,6 +111,8 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
...
@@ -108,6 +111,8 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
}
}
}
}
}
override
fun
onGroupViewHolderExpandChange
(
holder
:
ViewHolder
,
groupPosition
:
Int
,
animDuration
:
Long
,
expand
:
Boolean
)
{}
override
fun
onGroupViewHolderExpandChange
(
holder
:
ViewHolder
,
groupPosition
:
Int
,
animDuration
:
Long
,
expand
:
Boolean
)
{}
private
fun
chooseSizeChange
()
{
private
fun
chooseSizeChange
()
{
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/fragment/HomeFragment.kt
View file @
4ef31f4f
...
@@ -3,7 +3,6 @@ package com.base.filerecoveryrecyclebin.fragment
...
@@ -3,7 +3,6 @@ package com.base.filerecoveryrecyclebin.fragment
import
android.animation.ValueAnimator
import
android.animation.ValueAnimator
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.usage.StorageStatsManager
import
android.app.usage.StorageStatsManager
import
android.content.Context
import
android.content.Context.STORAGE_STATS_SERVICE
import
android.content.Context.STORAGE_STATS_SERVICE
import
android.content.Intent
import
android.content.Intent
import
android.os.Build
import
android.os.Build
...
...
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