Commit 4ef31f4f authored by wanglei's avatar wanglei

...

parent c7f8c090
...@@ -63,11 +63,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() { ...@@ -63,11 +63,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
if (!checkStorePermission()) { if (!checkStorePermission()) {
if (dialog == null) { if (dialog == null) {
dialog = showPermissionBottomSheet(launcher) { dialog = showPermissionBottomSheet(launcher) {
AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner) // AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner)
} }
} }
} else { } else {
AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner) // AdmobBannerUtils.showCollapsibleBannerAd(this, binding.flBanner)
} }
binding.viewpager2.run { binding.viewpager2.run {
......
...@@ -161,13 +161,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() { ...@@ -161,13 +161,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize += l.size totalSize += l.size
list.add(ChildBean(R.mipmap.apk, l.name, l.path, l.size)) list.add(ChildBean(R.mipmap.apk, l.name, l.path, l.size))
} }
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
repeat(5) { // repeat(5) {
val size = Random.nextLong(500) // val size = Random.nextLong(500)
totalSize += size // totalSize += size
list.add(ChildBean(R.mipmap.apk, "1", "apl$it", size)) // list.add(ChildBean(R.mipmap.apk, "1", "apl$it", size))
} // }
} // }
delay(Random.nextLong(1500, 2000)) delay(Random.nextLong(1500, 2000))
}.await() }.await()
junkExpandAdapter.addChildData(1, list) junkExpandAdapter.addChildData(1, list)
...@@ -180,13 +180,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() { ...@@ -180,13 +180,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize += l.size totalSize += l.size
list.add(ChildBean(R.mipmap.temp_clean, l.name, l.path, l.size)) list.add(ChildBean(R.mipmap.temp_clean, l.name, l.path, l.size))
} }
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
repeat(5) { // repeat(5) {
val size = Random.nextLong(500) // val size = Random.nextLong(500)
totalSize += size // totalSize += size
list.add(ChildBean(R.mipmap.temp_clean, "1", "temp$it", size)) // list.add(ChildBean(R.mipmap.temp_clean, "1", "temp$it", size))
} // }
} // }
delay(Random.nextLong(1500, 2000)) delay(Random.nextLong(1500, 2000))
}.await() }.await()
junkExpandAdapter.addChildData(2, list) junkExpandAdapter.addChildData(2, list)
...@@ -198,13 +198,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() { ...@@ -198,13 +198,13 @@ class CleanJunkActivity : BaseActivity<ActivityLayoutCleanJunkBinding>() {
totalSize += l.size totalSize += l.size
list.add(ChildBean(R.mipmap.log_clean, l.name, l.path, l.size)) list.add(ChildBean(R.mipmap.log_clean, l.name, l.path, l.size))
} }
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
repeat(5) { // repeat(5) {
val size = Random.nextLong(500) // val size = Random.nextLong(500)
totalSize += size // totalSize += size
list.add(ChildBean(R.mipmap.log_clean, "1", "log$it", size)) // list.add(ChildBean(R.mipmap.log_clean, "1", "log$it", size))
} // }
} // }
delay(Random.nextLong(1500, 2000)) delay(Random.nextLong(1500, 2000))
}.await() }.await()
junkExpandAdapter.addChildData(3, list) junkExpandAdapter.addChildData(3, list)
......
...@@ -90,11 +90,14 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand ...@@ -90,11 +90,14 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
viewHolder.binding.idTypeSize.text = parentBean.parentSize.toFormatSize(1) viewHolder.binding.idTypeSize.text = parentBean.parentSize.toFormatSize(1)
} }
viewHolder.binding.idXiala.isVisible = parentBean.childItem.isNotEmpty() viewHolder.binding.idXiala.isVisible = true
viewHolder.binding.idImgChoose.isSelected = parentBean.isParentSelected viewHolder.binding.idImgChoose.isSelected = parentBean.isParentSelected
bindParentAnimation(parentBean, groupPosition, viewHolder) bindParentAnimation(parentBean, groupPosition, viewHolder)
if (parentBean.childItem.isEmpty()) {
viewHolder.binding.idImgChoose.setOnClickListener { }
} else {
viewHolder.binding.idImgChoose.setOnClickListener { viewHolder.binding.idImgChoose.setOnClickListener {
viewHolder.binding.idImgChoose.isSelected = !viewHolder.binding.idImgChoose.isSelected viewHolder.binding.idImgChoose.isSelected = !viewHolder.binding.idImgChoose.isSelected
parentBean.isParentSelected = viewHolder.binding.idImgChoose.isSelected parentBean.isParentSelected = viewHolder.binding.idImgChoose.isSelected
...@@ -108,6 +111,8 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand ...@@ -108,6 +111,8 @@ class JunkExpandAdapter(private val chooseAction: (size: Long) -> Unit) : Expand
} }
} }
}
override fun onGroupViewHolderExpandChange(holder: ViewHolder, groupPosition: Int, animDuration: Long, expand: Boolean) {} override fun onGroupViewHolderExpandChange(holder: ViewHolder, groupPosition: Int, animDuration: Long, expand: Boolean) {}
private fun chooseSizeChange() { private fun chooseSizeChange() {
......
...@@ -3,7 +3,6 @@ package com.base.filerecoveryrecyclebin.fragment ...@@ -3,7 +3,6 @@ package com.base.filerecoveryrecyclebin.fragment
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.usage.StorageStatsManager import android.app.usage.StorageStatsManager
import android.content.Context
import android.content.Context.STORAGE_STATS_SERVICE import android.content.Context.STORAGE_STATS_SERVICE
import android.content.Intent import android.content.Intent
import android.os.Build import android.os.Build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment