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
46cf468d
Commit
46cf468d
authored
Jun 19, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步代码
parent
2149a77f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
9 deletions
+44
-9
ScreenShotActivity.kt
.../test/easy/easycleanerjunk/activity/ScreenShotActivity.kt
+7
-2
SettingActivity.kt
...com/test/easy/easycleanerjunk/activity/SettingActivity.kt
+2
-1
PrivacyAgreementManager.kt
...asycleanerjunk/activity/splash/PrivacyAgreementManager.kt
+1
-1
ScreenShotAdapter.kt
...om/test/easy/easycleanerjunk/adapter/ScreenShotAdapter.kt
+27
-3
ConfigHelper.kt
.../java/com/test/easy/easycleanerjunk/helps/ConfigHelper.kt
+2
-1
item_screen_photo.xml
app/src/main/res/layout/item_screen_photo.xml
+1
-1
dimens.xml
app/src/main/res/values/dimens.xml
+4
-0
No files found.
app/src/main/java/com/test/easy/easycleanerjunk/activity/ScreenShotActivity.kt
View file @
46cf468d
...
...
@@ -36,7 +36,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
}
override
fun
initView
()
{
screenShotAdapter
=
ScreenShotAdapter
{
size
->
screenShotAdapter
=
ScreenShotAdapter
(
this
)
{
size
->
setCleanUpUi
(
size
)
}
...
...
@@ -52,6 +52,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
binding
.
idLottie
.
setAnimation
(
"easy_imgcompress/data.json"
)
binding
.
idLottie
.
playAnimation
()
Handler
().
postDelayed
({
AdmobUtils
.
showInterstitialAd
(
this
)
{
binding
.
clLottie
.
visibility
=
View
.
GONE
...
...
@@ -64,9 +65,9 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
if
(
flag
)
initData
()
else
finishToMain
()
})
})
}
}
},
Random
.
nextLong
(
2500
,
4000
))
}
...
...
@@ -81,6 +82,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
binding
.
tvClean
.
isEnabled
=
false
binding
.
tvClean
.
text
=
"CLEAN"
}
binding
.
llSelectAll
.
isSelected
=
screenShotAdapter
.
isAllSelect
()
}
private
fun
initData
()
{
...
...
@@ -90,6 +92,9 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
val
sizeF
=
size
.
toFormatSize
().
split
(
" "
)
binding
.
tvSize
.
text
=
sizeF
[
0
]
binding
.
tvUnit
.
text
=
sizeF
[
1
]
binding
.
root
.
postDelayed
({
binding
.
llSelectAll
.
callOnClick
()
},
Random
.
nextLong
(
500
,
1000
))
}
override
fun
initListener
()
{
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/SettingActivity.kt
View file @
46cf468d
...
...
@@ -7,6 +7,7 @@ import com.test.easy.easycleanerjunk.databinding.ActivitySettingBinding
import
com.test.easy.easycleanerjunk.display.NotificationService
import
com.test.easy.easycleanerjunk.display.fcm.FcmHelper
import
com.test.easy.easycleanerjunk.helps.BaseActivity
import
com.test.easy.easycleanerjunk.helps.ConfigHelper
import
com.test.easy.easycleanerjunk.helps.ConfigHelper.allNotification
import
com.test.easy.easycleanerjunk.helps.ConfigHelper.remainNotification
...
...
@@ -44,7 +45,7 @@ class SettingActivity : BaseActivity<ActivitySettingBinding>() {
binding
.
cardPrivacy
.
setOnClickListener
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"https://sites.google.com/view/super-cleaner-max/super-cleaner-max"
)
Uri
.
parse
(
ConfigHelper
.
privacyPolicy
)
)
startActivity
(
intent
)
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/activity/splash/PrivacyAgreementManager.kt
View file @
46cf468d
...
...
@@ -42,7 +42,7 @@ class PrivacyAgreementManager {
binding
.
idTvPrivacyPolicy
.
setOnClickListener
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"https://sites.google.com/view/easy-cleannow/easy-clean"
)
Uri
.
parse
(
ConfigHelper
.
privacyPolicy
)
)
context
.
startActivity
(
intent
)
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/adapter/ScreenShotAdapter.kt
View file @
46cf468d
package
com.test.easy.easycleanerjunk.adapter
import
android.annotation.SuppressLint
import
android.content.Context
import
android.view.Gravity
import
android.view.View
import
android.view.ViewGroup
import
android.widget.GridLayout
import
android.widget.LinearLayout
import
androidx.core.view.setMargins
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView.LayoutParams
import
androidx.recyclerview.widget.RecyclerView.ViewHolder
import
com.bumptech.glide.Glide
import
com.test.easy.easycleanerjunk.R
...
...
@@ -15,13 +21,17 @@ import com.test.easy.easycleanerjunk.view.XmlEx.inflate
class
ScreenShotAdapter
(
val
context
:
Context
,
val
select
:
(
size
:
Int
)
->
Unit
)
:
RecyclerView
.
Adapter
<
ScreenShotAdapter
.
SSS
>()
{
private
var
beans
=
arrayListOf
<
ScreenshotBean
>()
private
val
itemViewSize
=
context
.
resources
.
getDimensionPixelOffset
(
R
.
dimen
.
dp_109
)
private
val
margin
=
context
.
resources
.
getDimensionPixelOffset
(
R
.
dimen
.
dp_5
)
inner
class
SSS
(
view
:
View
)
:
ViewHolder
(
view
)
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
SSS
{
return
SSS
(
R
.
layout
.
item_screenshot
.
inflate
(
parent
))
}
...
...
@@ -43,11 +53,14 @@ class ScreenShotAdapter(
select
.
invoke
(
getSelectDataSize
())
}
binding
.
tvTime
.
text
=
bean
.
time
binding
.
group
.
removeAllViews
()
bean
.
screenPhotoBean
.
forEach
{
screenPhotoBean
->
val
photoBinding
=
ItemScreenPhotoBinding
.
bind
(
R
.
layout
.
item_screen_photo
.
inflate
(
binding
.
group
))
val
itemView
=
R
.
layout
.
item_screen_photo
.
inflate
(
binding
.
group
)
val
photoBinding
=
ItemScreenPhotoBinding
.
bind
(
itemView
)
Glide
.
with
(
context
).
load
(
screenPhotoBean
.
file
).
centerCrop
().
into
(
photoBinding
.
iv
)
photoBinding
.
ivSelector
.
isSelected
=
screenPhotoBean
.
isSelect
arrayOf
(
photoBinding
.
root
,
photoBinding
.
ivSelector
).
forEach
{
...
...
@@ -59,9 +72,16 @@ class ScreenShotAdapter(
select
.
invoke
(
getSelectDataSize
())
}
}
binding
.
group
.
addView
(
photoBinding
.
root
)
binding
.
group
.
addView
(
itemView
)
}
if
(
bean
.
screenPhotoBean
.
size
<
3
)
{
repeat
(
2
)
{
val
itemView
=
R
.
layout
.
item_screen_photo
.
inflate
(
binding
.
group
)
itemView
.
visibility
=
View
.
INVISIBLE
binding
.
group
.
addView
(
itemView
)
}
}
}
@SuppressLint
(
"NotifyDataSetChanged"
)
...
...
@@ -82,6 +102,10 @@ class ScreenShotAdapter(
notifyDataSetChanged
()
}
fun
isAllSelect
():
Boolean
{
return
beans
.
all
{
bean
->
bean
.
screenPhotoBean
.
all
{
it
.
isSelect
}
}
}
fun
getSelectDataSize
():
Int
{
return
beans
.
sumOf
{
bean
->
bean
.
screenPhotoBean
.
filter
{
it
.
isSelect
}.
size
}
}
...
...
app/src/main/java/com/test/easy/easycleanerjunk/helps/ConfigHelper.kt
View file @
46cf468d
...
...
@@ -7,10 +7,11 @@ import com.test.easy.easycleanerjunk.utils.SPUtils
object
ConfigHelper
{
var
gid
=
""
var
isOpenNotification
=
false
var
appList
:
List
<
AppInfo
>?
=
null
const
val
privacyPolicy
=
"https://sites.google.com/view/easy-cleannow/easy-clean"
// 域名
const
val
eventUrl
=
"https://rp.easyfilemanager.xyz"
...
...
app/src/main/res/layout/item_screen_photo.xml
View file @
46cf468d
...
...
@@ -3,12 +3,12 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_columnWeight=
"1"
android:layout_height=
"109dp"
android:layout_margin=
"4dp"
app:cardCornerRadius=
"5dp"
>
<ImageView
android:id=
"@+id/iv"
android:layout_width=
"match_parent"
...
...
app/src/main/res/values/dimens.xml
View file @
46cf468d
...
...
@@ -8,5 +8,9 @@
<dimen
name=
"dp_30"
>
30dp
</dimen>
<dimen
name=
"dp_300"
>
300dp
</dimen>
<dimen
name=
"dp_310"
>
310dp
</dimen>
<dimen
name=
"dp_200"
>
200dp
</dimen>
<dimen
name=
"dp_109"
>
109dp
</dimen>
<dimen
name=
"dp_5"
>
5dp
</dimen>
<dimen
name=
"dp_8"
>
8dp
</dimen>
</resources>
\ No newline at end of file
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