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
6a16b6b4
Commit
6a16b6b4
authored
Jul 01, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
6215f869
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
WhatsAppCleanerActivity.kt
.../easy/easycleanerjunk/activity/WhatsAppCleanerActivity.kt
+1
-1
WhatsAppCleanerAdapter.kt
...st/easy/easycleanerjunk/adapter/WhatsAppCleanerAdapter.kt
+3
-0
item_whatsapp.xml
app/src/main/res/layout/item_whatsapp.xml
+1
-0
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/activity/WhatsAppCleanerActivity.kt
View file @
6a16b6b4
...
...
@@ -68,7 +68,7 @@ class WhatsAppCleanerActivity : BaseActivity<ActivityWhatsAppCleanerBinding>() {
if
(
file
.
name
==
"WhatsApp Video"
)
{
LogEx
.
logDebug
(
TAG
,
"whatsapp file=${file.absolutePath}"
)
val
bean
=
list
.
find
{
it
.
tittle
==
"
Image
Messages"
}
val
bean
=
list
.
find
{
it
.
tittle
==
"
Video
Messages"
}
val
subFile
=
getDirFiles
(
file
).
filter
{
isVideo
(
it
)
}
val
size
=
subFile
.
sumOf
{
it
.
length
()
}
bean
?.
size
=
size
...
...
app/src/main/java/com/test/easy/easycleanerjunk/adapter/WhatsAppCleanerAdapter.kt
View file @
6a16b6b4
...
...
@@ -40,10 +40,12 @@ class WhatsAppCleanerAdapter(val click: (bean: WhatsAppCleanerBean) -> Unit) : R
val
context
=
holder
.
itemView
.
context
val
bean
=
beanList
[
position
]
binding
.
iv
.
setImageDrawable
(
ContextCompat
.
getDrawable
(
context
,
bean
.
icon
))
binding
.
tvTitle
.
text
=
bean
.
tittle
if
(
bean
.
subFile
.
isEmpty
())
{
binding
.
llIv
.
visibility
=
View
.
GONE
binding
.
tvSize
.
setTextColor
(
Color
.
parseColor
(
"#999999"
))
binding
.
ivArrow
.
setImageDrawable
(
ContextCompat
.
getDrawable
(
context
,
R
.
mipmap
.
jianotu_whatsapp
))
binding
.
tvNoMessage
.
visibility
=
View
.
VISIBLE
}
else
{
binding
.
llIv
.
visibility
=
View
.
VISIBLE
runCatching
{
...
...
@@ -60,6 +62,7 @@ class WhatsAppCleanerAdapter(val click: (bean: WhatsAppCleanerBean) -> Unit) : R
binding
.
tvSize
.
setTextColor
(
Color
.
parseColor
(
"#355BEA"
))
binding
.
tvSize
.
text
=
bean
.
size
.
toFormatSize
()
binding
.
ivArrow
.
setImageDrawable
(
ContextCompat
.
getDrawable
(
context
,
R
.
mipmap
.
jianotul_whatsapp
))
binding
.
tvNoMessage
.
visibility
=
View
.
GONE
}
binding
.
root
.
setOnClickListener
{
if
(
bean
.
subFile
.
isEmpty
())
{
...
...
app/src/main/res/layout/item_whatsapp.xml
View file @
6a16b6b4
...
...
@@ -28,6 +28,7 @@
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Video Messages"
...
...
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