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
6b50e701
Commit
6b50e701
authored
Jun 23, 2025
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[拆包]修复问题
parent
8b19aed0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
77 additions
and
24 deletions
+77
-24
CleanPageFragment.kt
.../main/java/com/base/appzxhy/ui/clean/CleanPageFragment.kt
+2
-0
JunkCleanActivity.kt
.../main/java/com/base/appzxhy/ui/clean/JunkCleanActivity.kt
+24
-11
SplashActivity.kt
...rc/main/java/com/base/appzxhy/ui/splash/SplashActivity.kt
+3
-1
bg_00e4fd_0066ff.xml
app/src/main/res/drawable/bg_00e4fd_0066ff.xml
+11
-0
activity_battery_info.xml
app/src/main/res/layout/activity_battery_info.xml
+2
-1
activity_junk_clean_2.xml
app/src/main/res/layout/activity_junk_clean_2.xml
+1
-0
fragment_clean_native.xml
app/src/main/res/layout/fragment_clean_native.xml
+7
-6
fragment_clean_page.xml
app/src/main/res/layout/fragment_clean_page.xml
+24
-5
dimens.xml
app/src/main/res/values/dimens.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/com/base/appzxhy/ui/clean/CleanPageFragment.kt
View file @
6b50e701
...
@@ -12,6 +12,7 @@ import com.base.appzxhy.R
...
@@ -12,6 +12,7 @@ import com.base.appzxhy.R
class
CleanPageFragment
:
Fragment
()
{
class
CleanPageFragment
:
Fragment
()
{
var
tvPath
:
TextView
?
=
null
var
tvPath
:
TextView
?
=
null
var
tvSize
:
TextView
?
=
null
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
...
@@ -30,6 +31,7 @@ class CleanPageFragment : Fragment() {
...
@@ -30,6 +31,7 @@ class CleanPageFragment : Fragment() {
super
.
onViewCreated
(
view
,
savedInstanceState
)
super
.
onViewCreated
(
view
,
savedInstanceState
)
tvPath
=
view
.
findViewById
<
TextView
>(
R
.
id
.
tvPath
)
tvPath
=
view
.
findViewById
<
TextView
>(
R
.
id
.
tvPath
)
tvSize
=
view
.
findViewById
<
TextView
>(
R
.
id
.
tvSize
)
}
}
...
...
app/src/main/java/com/base/appzxhy/ui/clean/JunkCleanActivity.kt
View file @
6b50e701
...
@@ -22,11 +22,13 @@ import com.base.appzxhy.base.cleanFileBeans
...
@@ -22,11 +22,13 @@ import com.base.appzxhy.base.cleanFileBeans
import
com.base.appzxhy.bean.FeatureBean.Companion.JUNK_CLEAN
import
com.base.appzxhy.bean.FeatureBean.Companion.JUNK_CLEAN
import
com.base.appzxhy.bean.FeatureBean.Companion.setFunctionTodayUsed
import
com.base.appzxhy.bean.FeatureBean.Companion.setFunctionTodayUsed
import
com.base.appzxhy.bean.FileBean
import
com.base.appzxhy.bean.FileBean
import
com.base.appzxhy.bean.config.AdConfigBean
import
com.base.appzxhy.databinding.ActivityJunkClean2Binding
import
com.base.appzxhy.databinding.ActivityJunkClean2Binding
import
com.base.appzxhy.databinding.ItemJunkCleanChildBinding
import
com.base.appzxhy.databinding.ItemJunkCleanChildBinding
import
com.base.appzxhy.databinding.ItemJunkCleanGroupBinding
import
com.base.appzxhy.databinding.ItemJunkCleanGroupBinding
import
com.base.appzxhy.ui.cleanresult.CleanResultActivity
import
com.base.appzxhy.ui.cleanresult.CleanResultActivity
import
com.base.appzxhy.utils.FileUtils
import
com.base.appzxhy.utils.FileUtils
import
com.base.appzxhy.utils.KotlinExt.toFormatSize
import
com.base.appzxhy.utils.MediaUtils
import
com.base.appzxhy.utils.MediaUtils
import
com.base.appzxhy.utils.MineTypeUtils
import
com.base.appzxhy.utils.MineTypeUtils
import
com.base.appzxhy.utils.MyAnimationUtils
import
com.base.appzxhy.utils.MyAnimationUtils
...
@@ -53,11 +55,20 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
...
@@ -53,11 +55,20 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
private
val
page1
by
lazy
{
CleanPageFragment
()
}
private
val
page1
by
lazy
{
CleanPageFragment
()
}
private
val
page2
by
lazy
{
CleanNativeFragment
()
}
private
val
page2
by
lazy
{
CleanNativeFragment
()
}
private
val
fragments
by
lazy
{
arrayListOf
<
Fragment
>().
apply
{
add
(
page1
)
if
(
AdConfigBean
.
adsConfigBean
.
isAdShow
)
{
binding
.
indicator
.
visibility
=
View
.
VISIBLE
add
(
page2
)
}
}
}
private
val
viewPagerAdapter
by
lazy
{
private
val
viewPagerAdapter
by
lazy
{
object
:
FragmentStateAdapter
(
this
)
{
object
:
FragmentStateAdapter
(
this
)
{
override
fun
getItemCount
():
Int
=
2
override
fun
getItemCount
():
Int
=
fragments
.
size
override
fun
createFragment
(
position
:
Int
):
Fragment
=
if
(
position
==
0
)
page1
else
page2
override
fun
createFragment
(
position
:
Int
):
Fragment
=
fragments
[
position
]
}
}
}
}
private
var
currentPosition
=
0
private
var
currentPosition
=
0
...
@@ -218,20 +229,21 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
...
@@ -218,20 +229,21 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
}
}
})
})
lifecycleScope
.
launch
(
Dispatchers
.
IO
)
{
if
(
AdConfigBean
.
adsConfigBean
.
isAdShow
){
while
(
isActive
)
{
lifecycleScope
.
launch
(
Dispatchers
.
IO
)
{
delay
(
3000
)
while
(
isActive
)
{
launch
(
Dispatchers
.
Main
)
{
delay
(
3000
)
if
(
currentPosition
==
0
)
{
launch
(
Dispatchers
.
Main
)
{
binding
.
viewPager2
.
setCurrentItem
(
1
,
true
)
if
(
currentPosition
==
0
)
{
}
else
{
binding
.
viewPager2
.
setCurrentItem
(
1
,
true
)
binding
.
viewPager2
.
setCurrentItem
(
0
,
true
)
}
else
{
binding
.
viewPager2
.
setCurrentItem
(
0
,
true
)
}
}
}
}
}
}
}
}
}
}
}
override
fun
initListener
()
{
override
fun
initListener
()
{
...
@@ -345,6 +357,7 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
...
@@ -345,6 +357,7 @@ class JunkCleanActivity : BaseActivity<ActivityJunkClean2Binding>(ActivityJunkCl
binding
.
tvClean
.
visibility
=
View
.
VISIBLE
binding
.
tvClean
.
visibility
=
View
.
VISIBLE
updateSelection
()
updateSelection
()
page1
.
tvPath
?.
setText
(
R
.
string
.
scan_completed
)
page1
.
tvPath
?.
setText
(
R
.
string
.
scan_completed
)
page1
.
tvSize
?.
text
=
getString
(
R
.
string
.
found_f
,
total
.
toFormatSize
())
}
}
private
fun
setSize
(
size
:
Long
)
{
private
fun
setSize
(
size
:
Long
)
{
...
...
app/src/main/java/com/base/appzxhy/ui/splash/SplashActivity.kt
View file @
6b50e701
...
@@ -86,7 +86,9 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
...
@@ -86,7 +86,9 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
super
.
initView
()
super
.
initView
()
showLoadingAd
()
showLoadingAd
()
setPrivacyPolicy
()
setPrivacyPolicy
()
requestNotificationPermission
()
if
(!
isGuided
)
{
requestNotificationPermission
()
}
viewModel
.
jumpNext
=
{
viewModel
.
jumpNext
=
{
Log
.
e
(
TAG
,
"Countdown jumpNext"
)
Log
.
e
(
TAG
,
"Countdown jumpNext"
)
jumpNext
()
jumpNext
()
...
...
app/src/main/res/drawable/bg_00e4fd_0066ff.xml
0 → 100644
View file @
6b50e701
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:endColor=
"#0066FF"
android:startColor=
"#00E4FD"
/>
<stroke
android:width=
"@dimen/dp_1"
android:color=
"@color/white"
/>
<corners
android:radius=
"@dimen/dp_88"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/activity_battery_info.xml
View file @
6b50e701
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:paddingBottom=
"@dimen/dp_20"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
...
@@ -99,7 +100,7 @@
...
@@ -99,7 +100,7 @@
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_
6
0"
android:layout_marginTop=
"@dimen/dp_
4
0"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingHorizontal=
"38dp"
android:paddingHorizontal=
"38dp"
app:layout_constraintTop_toBottomOf=
"@id/iv_battery"
>
app:layout_constraintTop_toBottomOf=
"@id/iv_battery"
>
...
...
app/src/main/res/layout/activity_junk_clean_2.xml
View file @
6b50e701
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_4"
android:layout_marginTop=
"@dimen/dp_4"
android:visibility=
"invisible"
android:layout_marginBottom=
"@dimen/dp_38"
android:layout_marginBottom=
"@dimen/dp_38"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
app/src/main/res/layout/fragment_clean_native.xml
View file @
6b50e701
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -8,19 +9,19 @@
...
@@ -8,19 +9,19 @@
android:paddingHorizontal=
"@dimen/dp_26"
android:paddingHorizontal=
"@dimen/dp_26"
tools:context=
".ui.clean.CleanNativeFragment"
>
tools:context=
".ui.clean.CleanNativeFragment"
>
<
FrameLayout
<
androidx.cardview.widget.CardView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:background=
"@drawable/bg_ffffff_8"
>
android:layout_marginHorizontal=
"@dimen/dp_16"
app:cardBackgroundColor=
"@color/white"
app:cardCornerRadius=
"@dimen/dp_8"
>
<com.base.appzxhy.business.ads.NativeParentView
<com.base.appzxhy.business.ads.NativeParentView
android:id=
"@+id/flAd"
android:id=
"@+id/flAd"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
>
android:layout_margin=
"@dimen/dp_16"
android:layout_marginHorizontal=
"@dimen/dp_8"
>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -30,7 +31,7 @@
...
@@ -30,7 +31,7 @@
</com.base.appzxhy.business.ads.NativeParentView>
</com.base.appzxhy.business.ads.NativeParentView>
</
FrameLayout
>
</
androidx.cardview.widget.CardView
>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_clean_page.xml
View file @
6b50e701
...
@@ -14,10 +14,29 @@
...
@@ -14,10 +14,29 @@
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:ignore=
"UselessParent"
>
tools:ignore=
"UselessParent"
>
<
androidx.appcompat.widget.AppCompatImageView
<
FrameLayout
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
>
app:srcCompat=
"@drawable/img_shuju"
/>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:srcCompat=
"@drawable/img_shuju"
/>
<TextView
android:id=
"@+id/tvSize"
android:layout_width=
"@dimen/dp_238"
android:layout_height=
"@dimen/dp_50"
android:layout_gravity=
"center"
android:layout_marginTop=
"@dimen/dp_20"
android:background=
"@drawable/bg_00e4fd_0066ff"
android:gravity=
"center"
android:text=
"@string/redundant_files_found"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:textStyle=
"bold"
/>
</FrameLayout>
<TextView
<TextView
android:id=
"@+id/tvPath"
android:id=
"@+id/tvPath"
...
@@ -28,10 +47,10 @@
...
@@ -28,10 +47,10 @@
android:gravity=
"center"
android:gravity=
"center"
android:paddingHorizontal=
"@dimen/dp_8"
android:paddingHorizontal=
"@dimen/dp_8"
android:singleLine=
"true"
android:singleLine=
"true"
android:text=
"@string/scan_completed"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:textSize=
"@dimen/sp_16"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
tools:text=
"@string/scan_completed"
/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
6b50e701
...
@@ -66,4 +66,5 @@
...
@@ -66,4 +66,5 @@
<dimen
name=
"dp_72"
>
72dp
</dimen>
<dimen
name=
"dp_72"
>
72dp
</dimen>
<dimen
name=
"dp_132"
>
132dp
</dimen>
<dimen
name=
"dp_132"
>
132dp
</dimen>
<dimen
name=
"dp_200"
>
200dp
</dimen>
<dimen
name=
"dp_200"
>
200dp
</dimen>
<dimen
name=
"dp_238"
>
238dp
</dimen>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
6b50e701
...
@@ -170,6 +170,8 @@ Please rest assured that we will handle your information in strict accordance wi
...
@@ -170,6 +170,8 @@ Please rest assured that we will handle your information in strict accordance wi
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
<string
name=
"hello_blank_fragment"
>
Hello blank fragment
</string>
<string
name=
"scan_completed"
>
Scan Completed
</string>
<string
name=
"scan_completed"
>
Scan Completed
</string>
<string
name=
"turn_on_notification"
>
Turn on notification
</string>
<string
name=
"turn_on_notification"
>
Turn on notification
</string>
<string
name=
"redundant_files_found"
>
Redundant Files Found
</string>
<string
name=
"found_f"
>
%1$s Found
</string>
</resources>
</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