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
f784fd90
Commit
f784fd90
authored
Jun 12, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
b19262a2
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
128 additions
and
65 deletions
+128
-65
CleanResultActivity.kt
...va/com/base/appzxhy/ui/cleanresult/CleanResultActivity.kt
+32
-9
SplashActivity.kt
...rc/main/java/com/base/appzxhy/ui/splash/SplashActivity.kt
+7
-2
SplashViewModel.kt
...c/main/java/com/base/appzxhy/ui/splash/SplashViewModel.kt
+11
-0
icon_antivirus_r.png
app/src/main/res/drawable-xxhdpi/icon_antivirus_r.png
+0
-0
icon_battery_info_r.png
app/src/main/res/drawable-xxhdpi/icon_battery_info_r.png
+0
-0
icon_clean_r.png
app/src/main/res/drawable-xxhdpi/icon_clean_r.png
+0
-0
icon_image_compression_r.png
...src/main/res/drawable-xxhdpi/icon_image_compression_r.png
+0
-0
icon_large_file_clean_r.png
app/src/main/res/drawable-xxhdpi/icon_large_file_clean_r.png
+0
-0
icon_screenshot_r.png
app/src/main/res/drawable-xxhdpi/icon_screenshot_r.png
+0
-0
icon_similar_photos_r.png
app/src/main/res/drawable-xxhdpi/icon_similar_photos_r.png
+0
-0
item_clean_result.xml
app/src/main/res/layout/item_clean_result.xml
+76
-54
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/com/base/appzxhy/ui/cleanresult/CleanResultActivity.kt
View file @
f784fd90
...
...
@@ -25,6 +25,7 @@ import com.base.appzxhy.business.ads.AdsMgr
import
com.base.appzxhy.business.ads.AdsShowCallBack
import
com.base.appzxhy.databinding.ActivityCleanResultBinding
import
com.base.appzxhy.databinding.ItemCleanResultBinding
import
com.base.appzxhy.ui.malware.MalwareDialog
import
com.base.appzxhy.utils.MyAnimationUtils
import
com.base.appzxhy.utils.Utils
...
...
@@ -53,9 +54,17 @@ class CleanResultActivity : BaseActivity<ActivityCleanResultBinding>(ActivityCle
holder
.
binding
.
ivImage
.
setImageResource
(
item
.
icon
)
holder
.
binding
.
tvName
.
text
=
getString
(
item
.
titleRes
)
holder
.
binding
.
tvContent
.
setText
(
item
.
content
)
holder
.
binding
.
tvCleanNow
.
setOnClickListener
{
holder
.
binding
.
tvTry
.
setOnClickListener
{
if
(
item
.
key
==
ANTIVIRUS
)
{
val
dialog
=
MalwareDialog
(
this
@CleanResultActivity
)
dialog
.
action
={
jumpAction
(
item
.
key
)
}
dialog
.
showDialog
()
}
else
{
jumpAction
(
item
.
key
)
}
}
val
translationX
=
resources
.
displayMetrics
.
widthPixels
.
toFloat
()
holder
.
itemView
.
translationX
=
-
translationX
...
...
@@ -115,20 +124,34 @@ class CleanResultActivity : BaseActivity<ActivityCleanResultBinding>(ActivityCle
private
fun
getData
():
MutableList
<
FeatureBean
>
{
val
list
=
mutableListOf
<
FeatureBean
>().
apply
{
add
(
FeatureBean
(
JUNK_CLEAN
,
R
.
string
.
junk_clean
,
R
.
drawable
.
h_junkclean
,
R
.
string
.
result_junk_clean
))
add
(
FeatureBean
(
BATTERY_INFO
,
R
.
string
.
battery_info
,
R
.
drawable
.
h_battery
,
R
.
string
.
result_battery_info
))
add
(
FeatureBean
(
LARGE_FILE_CLEAN
,
R
.
string
.
large_file_clean
,
R
.
drawable
.
h_lagre
,
R
.
string
.
result_large_file_clean
))
add
(
FeatureBean
(
JUNK_CLEAN
,
R
.
string
.
junk_clean
,
R
.
drawable
.
icon_clean_r
,
R
.
string
.
result_junk_clean
))
add
(
FeatureBean
(
ANTIVIRUS
,
R
.
string
.
antivirus
,
R
.
drawable
.
icon_antivirus_r
,
R
.
string
.
result_antivirus
))
add
(
FeatureBean
(
SCREENSHOT_CLEAN
,
R
.
string
.
screenshot_clean
,
R
.
drawable
.
icon_screenshot_r
,
R
.
string
.
result_screenshot_clean
)
)
add
(
FeatureBean
(
LARGE_FILE_CLEAN
,
R
.
string
.
large_file_clean
,
R
.
drawable
.
icon_large_file_clean_r
,
R
.
string
.
result_large_file_clean
)
)
add
(
FeatureBean
(
SIMILAR_PHOTOS
,
R
.
string
.
similar_photos
,
R
.
drawable
.
icon_similar_photos_r
,
R
.
string
.
result_similar_photos
))
add
(
FeatureBean
(
PHOTO_COMPRESSION
,
R
.
string
.
photo_compression
,
R
.
drawable
.
h_compression
,
R
.
drawable
.
icon_image_compression_r
,
R
.
string
.
result_photo_compression
)
)
add
(
FeatureBean
(
SCREENSHOT_CLEAN
,
R
.
string
.
screenshot_clean
,
R
.
drawable
.
h_screenshot
,
R
.
string
.
result_screenshot_clean
))
add
(
FeatureBean
(
SIMILAR_PHOTOS
,
R
.
string
.
similar_photos
,
R
.
drawable
.
h_similar
,
R
.
string
.
result_similar_photos
))
add
(
FeatureBean
(
BATTERY_INFO
,
R
.
string
.
battery_info
,
R
.
drawable
.
icon_battery_info_r
,
R
.
string
.
result_battery_info
))
}
...
...
app/src/main/java/com/base/appzxhy/ui/splash/SplashActivity.kt
View file @
f784fd90
...
...
@@ -91,7 +91,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
}
viewModel
.
onTick
=
{
s
,
t
,
p
->
Log
.
e
(
TAG
,
"onTick $s $t"
)
binding
.
progressBar
.
progress
=
p
.
toInt
(
)
binding
.
progressBar
.
setProgress
(
p
.
toInt
(),
true
)
}
}
...
...
@@ -181,13 +181,18 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
val
acAction
=
{
initUMP
{
LogEx
.
logDebug
(
TAG
,
"initUMP callback"
)
AdsMgr
.
showOpen
(
this
,
showCallBack
=
object
:
AdsShowCallBack
()
{
override
fun
show
()
{
viewModel
.
stopCountdown
()
binding
.
progressBar
.
setProgress
(
100
,
true
)
}
override
fun
next
()
{
binding
.
root
.
postDelayed
({
jumpNext
()
},
200
)
LogEx
.
logDebug
(
TAG
,
"next"
)
viewModel
.
overCountDown
()
binding
.
progressBar
.
setProgress
(
100
,
true
)
binding
.
root
.
postDelayed
({
jumpNext
()
},
250
)
}
})
...
...
app/src/main/java/com/base/appzxhy/ui/splash/SplashViewModel.kt
View file @
f784fd90
...
...
@@ -18,6 +18,7 @@ class SplashViewModel : ViewModel() {
private
var
startTime
:
Long
=
0
val
totalTimeMs
=
AdConfigBean
.
adsConfigBean
.
openAdLoading
*
1000L
// 倒计时总时长
private
val
checkIntervalMs
=
100L
// 检查间隔(100毫秒)
private
var
countdownOver
:
Boolean
=
false
var
jumpNext
:
(()
->
Unit
)?
=
null
var
onTick
:
((
sLong
:
Long
,
total
:
Long
,
percent
:
Float
)
->
Unit
)?
=
null
...
...
@@ -26,6 +27,8 @@ class SplashViewModel : ViewModel() {
if
(!
ifAgreePrivacy
)
return
if
(
countdownOver
)
return
countdownJob
?.
cancel
()
startTime
=
System
.
currentTimeMillis
()
countdownJob
=
viewModelScope
.
launch
(
Dispatchers
.
IO
)
{
...
...
@@ -62,4 +65,12 @@ class SplashViewModel : ViewModel() {
countdownJob
?.
cancel
()
countdownJob
=
null
}
/**
* 永久结束倒计时
*/
fun
overCountDown
()
{
countdownOver
=
true
stopCountdown
()
}
}
app/src/main/res/drawable-xxhdpi/icon_antivirus_r.png
0 → 100644
View file @
f784fd90
6.29 KB
app/src/main/res/drawable-xxhdpi/icon_battery_info_r.png
0 → 100644
View file @
f784fd90
3.2 KB
app/src/main/res/drawable-xxhdpi/icon_clean_r.png
0 → 100644
View file @
f784fd90
4.71 KB
app/src/main/res/drawable-xxhdpi/icon_image_compression_r.png
0 → 100644
View file @
f784fd90
4.73 KB
app/src/main/res/drawable-xxhdpi/icon_large_file_clean_r.png
0 → 100644
View file @
f784fd90
4.52 KB
app/src/main/res/drawable-xxhdpi/icon_screenshot_r.png
0 → 100644
View file @
f784fd90
3.57 KB
app/src/main/res/drawable-xxhdpi/icon_similar_photos_r.png
0 → 100644
View file @
f784fd90
5.14 KB
app/src/main/res/layout/item_clean_result.xml
View file @
f784fd90
...
...
@@ -4,16 +4,29 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"12dp"
android:layout_marginEnd=
"15dp"
android:background=
"@drawable/white_background"
android:padding=
"16dp"
>
android:layout_marginVertical=
"@dimen/dp_8"
>
<androidx.cardview.widget.CardView
android:id=
"@+id/card"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"@dimen/dp_15"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"@dimen/dp_12"
app:cardElevation=
"0dp"
app:layout_constraintTop_toTopOf=
"parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/iv_image"
android:layout_width=
"@dimen/dp_40"
android:layout_height=
"@dimen/dp_40"
android:layout_width=
"@dimen/dp_50"
android:layout_height=
"@dimen/dp_50"
android:layout_marginStart=
"@dimen/dp_14"
android:layout_marginTop=
"@dimen/dp_20"
android:src=
"@drawable/h_junkclean"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -24,9 +37,10 @@
android:layout_height=
"wrap_content"
android:layout_marginStart=
"5dp"
android:orientation=
"vertical"
app:layout_constraintBottom_toBottomOf=
"@id/iv_image"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_image"
app:layout_constraintTop_toTopOf=
"parent
"
>
app:layout_constraintTop_toTopOf=
"@id/iv_image
"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_name"
...
...
@@ -34,42 +48,50 @@
android:layout_height=
"wrap_content"
android:text=
"@string/junk_clean"
android:textColor=
"@color/color_181b1f"
android:textSize=
"16sp
"
android:textSize=
"@dimen/sp_16
"
android:textStyle=
"bold"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_2"
android:text=
"@string/result_junk_clean"
android:textColor=
"@color/color_666666
"
android:textSize=
"16sp
"
/>
android:textColor=
"#999999
"
android:textSize=
"@dimen/sp_14
"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/tv_clean_now"
android:layout_width=
"match_parent"
<TextView
android:id=
"@+id/tvTry"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:background=
"@drawable/bg_btn_50"
android:gravity=
"center"
android:paddingTop=
"8dp"
android:paddingBottom=
"8dp"
android:text=
"@string/clean_now"
android:textColor=
"@color/white"
android:textSize=
"14sp"
android:textStyle=
"bold"
app:layout_constraintTop_toBottomOf=
"@id/ll_content"
tools:layout_editor_absoluteX=
"16dp"
/>
android:layout_marginTop=
"@dimen/dp_8"
android:layout_marginEnd=
"@dimen/dp_15"
android:layout_marginBottom=
"@dimen/dp_20"
android:gravity=
"center_vertical"
android:text=
"@string/try_it_new"
android:textColor=
"#2DD29E"
app:drawableEndCompat=
"@drawable/jiangtou_3"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll_content"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<com.base.appzxhy.business.ads.NativeParentView
android:id=
"@+id/flAd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"@dimen/dp_15"
android:layout_marginTop=
"4dp"
android:visibility=
"gone"
app:layout_constraintTop_toBottomOf=
"@id/tv_clean_now"
>
app:layout_constraintTop_toBottomOf=
"@id/card"
tools:visibility=
"visible"
>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width=
"match_parent"
...
...
app/src/main/res/values/strings.xml
View file @
f784fd90
...
...
@@ -65,6 +65,7 @@ Please rest assured that we will handle your information in strict accordance wi
<string
name=
"cleaned_up"
>
Cleaned Up
</string>
<string
name=
"cleaned_up_content"
>
Cleaned up other data to free up more space
</string>
<string
name=
"result_junk_clean"
>
Clean up unnecessary junk files!
</string>
<string
name=
"result_antivirus"
>
Mobile antivirus protection
</string>
<string
name=
"clean_now"
>
Clean Now
</string>
<string
name=
"result_battery_info"
>
View battery usage and details
</string>
<string
name=
"result_large_file_clean"
>
Clean large flies to free up storage space
</string>
...
...
@@ -203,6 +204,7 @@ Please rest assured that we will handle your information in strict accordance wi
<string
name=
"one_tap_clean"
>
One - Tap Clean
</string>
<string
name=
"get_started"
>
Get Started
</string>
<string
name=
"loading"
>
loading...
</string>
<string
name=
"try_it_new"
>
Try it New
</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