Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
scanqrwhitecopy
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
scanqrwhitecopy
Commits
a30abc7d
Commit
a30abc7d
authored
Jan 22, 2025
by
周文华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【调整】调整清理首页文案显示
parent
b8a8781a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
HomeFragment.kt
app/src/main/java/com/base/scanqrclear/luma/HomeFragment.kt
+5
-1
fragment_home.xml
app/src/main/res/layout/fragment_home.xml
+2
-1
No files found.
app/src/main/java/com/base/scanqrclear/luma/HomeFragment.kt
View file @
a30abc7d
...
...
@@ -5,6 +5,8 @@ import android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.animation.ValueAnimator
import
android.os.Bundle
import
android.text.SpannableString
import
android.text.style.AbsoluteSizeSpan
import
android.view.View
import
android.view.animation.LinearInterpolator
import
androidx.core.animation.doOnEnd
...
...
@@ -156,7 +158,9 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(FragmentHomeBinding::infl
val
totalLength
=
emptyLength
+
filesLength
val
totalSize
=
Utils
.
getSize
(
totalLength
)
withContext
(
Dispatchers
.
Main
)
{
binding
.
tvJunkFiles
.
text
=
totalSize
val
sp
=
SpannableString
(
"$totalSize\n${getString(R.string.junk_files)}"
)
sp
.
setSpan
(
AbsoluteSizeSpan
(
16
,
true
),
sp
.
indexOf
(
"\n"
),
sp
.
length
,
SpannableString
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
binding
.
tvJunkFiles
.
text
=
sp
}
}
}
...
...
app/src/main/res/layout/fragment_home.xml
View file @
a30abc7d
...
...
@@ -173,7 +173,8 @@
android:id=
"@+id/tv_junk_files"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"0 B"
android:text=
"@string/junk_files"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"20sp"
android:textStyle=
"bold"
...
...
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