Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
A
appzxhy
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
appzxhy
Commits
bcdfdef8
Commit
bcdfdef8
authored
Jun 24, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[拆包]首页ui
parent
898069de
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
2 deletions
+36
-2
build.gradle.kts
app/build.gradle.kts
+1
-0
JunkCleanActivity.kt
.../main/java/com/base/appzxhy/ui/clean/JunkCleanActivity.kt
+22
-1
HomeFragment.kt
app/src/main/java/com/base/appzxhy/ui/main/HomeFragment.kt
+12
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/build.gradle.kts
View file @
bcdfdef8
...
...
@@ -145,6 +145,7 @@ dependencies {
implementation
(
"com.github.angcyo.DslTablayout:TabLayout:3.7.1"
)
implementation
(
"com.github.zhpanvip:viewpagerindicator:1.2.3"
)
implementation
(
"nl.dionsegijn:konfetti-xml:2.0.5"
)
implementation
(
"com.scwang.wave:MultiWaveHeader:1.0.0-andx"
)
//lottie
...
...
app/src/main/java/com/base/appzxhy/ui/clean/JunkCleanActivity.kt
View file @
bcdfdef8
...
...
@@ -2,6 +2,7 @@ package com.base.appzxhy.ui.clean
import
android.animation.ValueAnimator
import
android.annotation.SuppressLint
import
android.content.Context
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
...
...
@@ -26,6 +27,7 @@ import com.base.appzxhy.bean.config.AdConfigBean
import
com.base.appzxhy.databinding.ActivityJunkClean2Binding
import
com.base.appzxhy.databinding.ItemJunkCleanChildBinding
import
com.base.appzxhy.databinding.ItemJunkCleanGroupBinding
import
com.base.appzxhy.ui.clean.JunkCleanActivity
import
com.base.appzxhy.ui.cleanresult.CleanResultActivity
import
com.base.appzxhy.utils.FileUtils
import
com.base.appzxhy.utils.KotlinExt.toFormatSize
...
...
@@ -229,7 +231,7 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
}
})
if
(
AdConfigBean
.
adsConfigBean
.
isAdShow
){
if
(
AdConfigBean
.
adsConfigBean
.
isAdShow
)
{
lifecycleScope
.
launch
(
Dispatchers
.
IO
)
{
while
(
isActive
)
{
delay
(
3000
)
...
...
@@ -366,4 +368,23 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
// binding.tvUnit.text = values[1]
}
companion
object
{
fun
getJunkSize
(
context
:
Context
):
Long
{
val
files
=
MediaUtils
.
findSpecifiedFiles
(
context
)
val
apkFiles
=
files
.
filter
{
file
->
MineTypeUtils
.
apks
.
any
{
suffix
->
file
.
name
.
endsWith
(
suffix
,
true
)
}
}.
toMutableList
()
val
tempFiles
=
files
.
filter
{
file
->
MineTypeUtils
.
temps
.
any
{
suffix
->
file
.
name
.
endsWith
(
suffix
,
true
)
}
}.
toMutableList
()
val
logsFiles
=
files
.
filter
{
file
->
MineTypeUtils
.
logs
.
any
{
suffix
->
file
.
name
.
endsWith
(
suffix
,
true
)
}
}.
toMutableList
()
val
size
=
apkFiles
.
sumOf
{
it
.
length
}
+
tempFiles
.
sumOf
{
it
.
length
}
+
logsFiles
.
sumOf
{
it
.
length
}
return
size
}
}
}
\ No newline at end of file
app/src/main/java/com/base/appzxhy/ui/main/HomeFragment.kt
View file @
bcdfdef8
...
...
@@ -2,6 +2,7 @@ package com.base.appzxhy.ui.main
import
android.annotation.SuppressLint
import
android.app.ActivityManager
import
android.view.View
import
androidx.core.content.ContextCompat.getSystemService
import
androidx.core.graphics.Insets
import
androidx.core.view.ViewCompat
...
...
@@ -23,9 +24,11 @@ import com.base.appzxhy.bean.FeatureBean.Companion.SETTINGS
import
com.base.appzxhy.bean.FeatureBean.Companion.SIMILAR_PHOTOS
import
com.base.appzxhy.bean.FeatureBean.Companion.UNINSTALL_APP
import
com.base.appzxhy.databinding.FragmentHome1Binding
import
com.base.appzxhy.ui.clean.JunkCleanActivity.Companion.getJunkSize
import
com.base.appzxhy.ui.dialog.permissionStorageJump
import
com.base.appzxhy.ui.set.SettingActivity
import
com.base.appzxhy.utils.BarUtils
import
com.base.appzxhy.utils.KotlinExt.toFormatSize
import
com.base.appzxhy.utils.Utils
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.async
...
...
@@ -178,6 +181,15 @@ class HomeFragment : BaseFragment<FragmentHome1Binding>(FragmentHome1Binding::in
binding
.
tvMemoryPercent
.
text
=
"$percentM%"
binding
.
tvStoragePercent
.
text
=
"$percent%"
}
val
size
=
getJunkSize
(
requireContext
())
launch
(
Dispatchers
.
Main
)
{
if
(
size
>
0
)
{
binding
.
tvSize
.
text
=
getString
(
R
.
string
.
junk_files
,
size
.
toFormatSize
())
}
else
{
binding
.
tvSize
.
visibility
=
View
.
INVISIBLE
}
}
}
}
...
...
app/src/main/res/values/strings.xml
View file @
bcdfdef8
...
...
@@ -133,7 +133,6 @@ Please rest assured that we will handle your information in strict accordance wi
<string
name=
"turn_on"
>
Turn on
</string>
<string
name=
"CLEAN"
>
CLEAN
</string>
<string
name=
"uninstall"
>
Uninstall
</string>
<string
name=
"powered_by_trustlook"
>
Powered by Trustlook
</string>
<string
name=
"malware_recommended"
>
It is recommended to turn on the network connection for more accurate results
</string>
<string
name=
"notification_tips"
>
Enable notifications to receive suggestions that matter.
</string>
<string
name=
"select_a_language"
>
Select a language
</string>
...
...
@@ -172,6 +171,7 @@ Please rest assured that we will handle your information in strict accordance wi
<string
name=
"storage_used"
>
Storage Used
</string>
<string
name=
"scanning"
>
Scanning...
</string>
<string
name=
"device_info"
>
Device Info
</string>
<string
name=
"junk_files"
>
%1$s Junk Files
</string>
</resources>
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