Commit 7f991049 authored by wanglei's avatar wanglei

...

parent fcaffe7a
...@@ -64,6 +64,7 @@ object ConstObject { ...@@ -64,6 +64,7 @@ object ConstObject {
const val FUNCTION_SCREEN_SHORT = "function_app_screen" const val FUNCTION_SCREEN_SHORT = "function_app_screen"
const val FUNCTION_SIMILAR = "function_similar" const val FUNCTION_SIMILAR = "function_similar"
const val FUNCTION_WHATSAPP = "function_whatsapp" const val FUNCTION_WHATSAPP = "function_whatsapp"
const val FUNCTION_LARGEFILE = "function_largefile"
var ifAgreePrivacy = false var ifAgreePrivacy = false
get() { get() {
......
...@@ -9,7 +9,11 @@ import androidx.appcompat.widget.AppCompatTextView ...@@ -9,7 +9,11 @@ import androidx.appcompat.widget.AppCompatTextView
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.base.pdfviewerscannerwhite.R import com.base.pdfviewerscannerwhite.R
import com.base.pdfviewerscannerwhite.ads.admob.AdmobInterstitialUtils
import com.base.pdfviewerscannerwhite.bean.ConstObject
import com.base.pdfviewerscannerwhite.databinding.ActivityLargeFileCleanBinding import com.base.pdfviewerscannerwhite.databinding.ActivityLargeFileCleanBinding
import com.base.pdfviewerscannerwhite.ui.result.ResultActivity
import com.base.pdfviewerscannerwhite.utils.LogEx
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
...@@ -147,10 +151,17 @@ class LargeFileCleanActivity : BaseActivity2() { ...@@ -147,10 +151,17 @@ class LargeFileCleanActivity : BaseActivity2() {
binding.tvDelete.setOnClickListener { binding.tvDelete.setOnClickListener {
if (total <= 0) return@setOnClickListener if (total <= 0) return@setOnClickListener
DialogHelps.showDeleteDialog(this, binding.tvDelete) { DialogHelps.showDeleteDialog(this, binding.tvDelete) {
cleanFiles(adapter.list) AdmobInterstitialUtils.showInterstitialAd(this, false, false) {
showAnimationAd { startActivity(Intent(this, ResultActivity::class.java).apply {
// toCleanResult(total, getString(R.string.large_file_clean)) putExtra("from", ConstObject.FUNCTION_LARGEFILE)
putExtra("clean_size", total)
// flags = FLAG_ACTIVITY_NEW_TASK or FLAG_ACTIVITY_CLEAR_TASK
LogEx.logDebug("clean_size", "total=$total")
})
finish()
} }
cleanFiles(adapter.list)
} }
} }
} }
......
...@@ -7,6 +7,7 @@ import androidx.activity.addCallback ...@@ -7,6 +7,7 @@ import androidx.activity.addCallback
import com.base.pdfviewerscannerwhite.R import com.base.pdfviewerscannerwhite.R
import com.base.pdfviewerscannerwhite.ads.admob.AdmobNativeUtils import com.base.pdfviewerscannerwhite.ads.admob.AdmobNativeUtils
import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_APP_PROCESS import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_APP_PROCESS
import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_LARGEFILE
import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_SCAM_JUNK import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_SCAM_JUNK
import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_SCREEN_SHORT import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_SCREEN_SHORT
import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_SIMILAR import com.base.pdfviewerscannerwhite.bean.ConstObject.FUNCTION_SIMILAR
...@@ -16,6 +17,7 @@ import com.base.pdfviewerscannerwhite.helper.BaseActivity ...@@ -16,6 +17,7 @@ import com.base.pdfviewerscannerwhite.helper.BaseActivity
import com.base.pdfviewerscannerwhite.mix.LargeFileCleanActivity import com.base.pdfviewerscannerwhite.mix.LargeFileCleanActivity
import com.base.pdfviewerscannerwhite.mix.ScreenshotCleanActivity import com.base.pdfviewerscannerwhite.mix.ScreenshotCleanActivity
import com.base.pdfviewerscannerwhite.mix.SimilarPhotosActivity import com.base.pdfviewerscannerwhite.mix.SimilarPhotosActivity
import com.base.pdfviewerscannerwhite.mix.WhatsappCleanActivity
import com.base.pdfviewerscannerwhite.ui.appprocess.AppProcessLoadingActivity import com.base.pdfviewerscannerwhite.ui.appprocess.AppProcessLoadingActivity
import com.base.pdfviewerscannerwhite.ui.cleanjunk.ScanJunkActivity import com.base.pdfviewerscannerwhite.ui.cleanjunk.ScanJunkActivity
import com.base.pdfviewerscannerwhite.utils.BarUtils import com.base.pdfviewerscannerwhite.utils.BarUtils
...@@ -120,6 +122,24 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() { ...@@ -120,6 +122,24 @@ class ResultActivity : BaseActivity<ActivityResultBinding>() {
finish() finish()
} }
} }
FUNCTION_LARGEFILE -> {
binding.tvTitle.text = getString(R.string.large_file_clean)
val s = intent.extras?.getLong("clean_size") ?: 0L
if (s != 0L) {
binding.tvSize.text = "Cleaned up ${s.toFormatSize(1)}"
}
binding.tvFunction.text = getString(R.string.whatsapp_clean)
binding.ivFunction.setImageResource(R.mipmap.icon_whatsapp_tools)
binding.tvFunctionDesc.text = getString(R.string.whatsapp_pop)
binding.tvFunctionBtn.text = getString(R.string.scan_now)
binding.tvFunctionBtn.setOnClickListener {
startActivity(Intent(this, WhatsappCleanActivity::class.java))
finish()
}
}
} }
......
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