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
Hide 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>() {
if
(!
checkStorePermission
())
{
if
(
dialog
==
null
)
{
dialog
=
showPermissionBottomSheet
(
launcher
)
{
AdmobBannerUtils
.
showCollapsibleBannerAd
(
this
,
binding
.
flBanner
)
//
AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner)
}
}
}
else
{
AdmobBannerUtils
.
showCollapsibleBannerAd
(
this
,
binding
.
flBanner
)
//
AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner)
}
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>() {
totalSize
+=
l
.
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
apk
,
l
.
name
,
l
.
path
,
l
.
size
))
}
if
(
BuildConfig
.
DEBUG
)
{
repeat
(
5
)
{
val
size
=
Random
.
nextLong
(
500
)
totalSize
+=
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
apk
,
"1"
,
"apl$it"
,
size
))
}
}
//
if (BuildConfig.DEBUG) {
//
repeat(5) {
//
val size = Random.nextLong(500)
//
totalSize += size
//
list.add(ChildBean(R.mipmap.apk, "1", "apl$it", size))
//
}
//
}
delay
(
Random
.
nextLong
(
1500
,
2000
))
}.
await
()
junkExpandAdapter
.
addChildData
(
1
,
list
)
...
...
@@ -180,13 +180,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize
+=
l
.
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
temp_clean
,
l
.
name
,
l
.
path
,
l
.
size
))
}
if
(
BuildConfig
.
DEBUG
)
{
repeat
(
5
)
{
val
size
=
Random
.
nextLong
(
500
)
totalSize
+=
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
temp_clean
,
"1"
,
"temp$it"
,
size
))
}
}
//
if (BuildConfig.DEBUG) {
//
repeat(5) {
//
val size = Random.nextLong(500)
//
totalSize += size
//
list.add(ChildBean(R.mipmap.temp_clean, "1", "temp$it", size))
//
}
//
}
delay
(
Random
.
nextLong
(
1500
,
2000
))
}.
await
()
junkExpandAdapter
.
addChildData
(
2
,
list
)
...
...
@@ -198,13 +198,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize
+=
l
.
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
log_clean
,
l
.
name
,
l
.
path
,
l
.
size
))
}
if
(
BuildConfig
.
DEBUG
)
{
repeat
(
5
)
{
val
size
=
Random
.
nextLong
(
500
)
totalSize
+=
size
list
.
add
(
ChildBean
(
R
.
mipmap
.
log_clean
,
"1"
,
"log$it"
,
size
))
}
}
//
if (BuildConfig.DEBUG) {
//
repeat(5) {
//
val size = Random.nextLong(500)
//
totalSize += size
//
list.add(ChildBean(R.mipmap.log_clean, "1", "log$it", size))
//
}
//
}
delay
(
Random
.
nextLong
(
1500
,
2000
))
}.
await
()
junkExpandAdapter
.
addChildData
(
3
,
list
)
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/adapter/JunkExpandAdapter.kt
View file @
4ef31f4f
...
...
@@ -90,22 +90,27 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
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
bindParentAnimation
(
parentBean
,
groupPosition
,
viewHolder
)
viewHolder
.
binding
.
idImgChoose
.
setOnClickListener
{
viewHolder
.
binding
.
idImgChoose
.
isSelected
=
!
viewHolder
.
binding
.
idImgChoose
.
isSelected
parentBean
.
isParentSelected
=
viewHolder
.
binding
.
idImgChoose
.
isSelected
if
(
parentBean
.
childItem
.
isEmpty
())
{
viewHolder
.
binding
.
idImgChoose
.
setOnClickListener
{
}
}
else
{
viewHolder
.
binding
.
idImgChoose
.
setOnClickListener
{
viewHolder
.
binding
.
idImgChoose
.
isSelected
=
!
viewHolder
.
binding
.
idImgChoose
.
isSelected
parentBean
.
isParentSelected
=
viewHolder
.
binding
.
idImgChoose
.
isSelected
parentBean
.
childItem
.
forEach
{
it
.
isChildSelected
=
parentBean
.
isParentSelected
}
notifyDataSetChanged
()
parentBean
.
childItem
.
forEach
{
it
.
isChildSelected
=
parentBean
.
isParentSelected
}
notifyDataSetChanged
()
chooseSizeChange
()
chooseSizeChange
()
}
}
}
override
fun
onGroupViewHolderExpandChange
(
holder
:
ViewHolder
,
groupPosition
:
Int
,
animDuration
:
Long
,
expand
:
Boolean
)
{}
...
...
app/src/main/java/com/base/filerecoveryrecyclebin/fragment/HomeFragment.kt
View file @
4ef31f4f
...
...
@@ -3,7 +3,6 @@ package com.base.filerecoveryrecyclebin.fragment
import
android.animation.ValueAnimator
import
android.annotation.SuppressLint
import
android.app.usage.StorageStatsManager
import
android.content.Context
import
android.content.Context.STORAGE_STATS_SERVICE
import
android.content.Intent
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