Commit 28cd9e39 authored by wanglei's avatar wanglei

aaa

parent b2ee4c82
Pipeline #1048 failed with stages
...@@ -12,6 +12,7 @@ import android.widget.ListView ...@@ -12,6 +12,7 @@ import android.widget.ListView
import android.widget.ProgressBar import android.widget.ProgressBar
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.RecyclerView
import com.cleanmaster.junk.bean.SDcardRubbishResult import com.cleanmaster.junk.bean.SDcardRubbishResult
import com.cloud.cleanjunksdk.ad.AdvBean import com.cloud.cleanjunksdk.ad.AdvBean
import com.cloud.cleanjunksdk.cache.CacheBean import com.cloud.cleanjunksdk.cache.CacheBean
...@@ -25,6 +26,7 @@ import com.cm.plugincluster.junkengine.junk.engine.MEDIA_TYPE ...@@ -25,6 +26,7 @@ import com.cm.plugincluster.junkengine.junk.engine.MEDIA_TYPE
import com.test.mydemo3.MyApplication import com.test.mydemo3.MyApplication
import com.test.mydemo3.R import com.test.mydemo3.R
import com.test.mydemo3.adapter.CleanAdapter import com.test.mydemo3.adapter.CleanAdapter
import com.test.mydemo3.adapter.CleanAdapter2
import com.test.mydemo3.antivirus.AntivirusActivity import com.test.mydemo3.antivirus.AntivirusActivity
import com.test.mydemo3.model.CleanBean import com.test.mydemo3.model.CleanBean
import com.test.mydemo3.model.FileBean import com.test.mydemo3.model.FileBean
...@@ -35,12 +37,14 @@ class CleanActivity : AppCompatActivity() { ...@@ -35,12 +37,14 @@ class CleanActivity : AppCompatActivity() {
private var mQuitBtn: ImageView? = null private var mQuitBtn: ImageView? = null
private var mHintTv: TextView? = null private var mHintTv: TextView? = null
private var mProgress: ProgressBar? = null private var mProgress: ProgressBar? = null
private lateinit var mListView: ListView private lateinit var mListView: RecyclerView
private var mCleanAdapter: CleanAdapter? = null
// private var mCleanAdapter: CleanAdapter? = null
private var mCleanAdapter2: CleanAdapter2? = null
private var mAdView: View? = null private var mAdView: View? = null
private lateinit var mAnimation: View private lateinit var mAnimation: View
private lateinit var mCleanBtn: TextView private lateinit var mCleanBtn: TextView
private var junkScanCallback : JunkScanCallback? = null private var junkScanCallback: JunkScanCallback? = null
private var mCount = 0 private var mCount = 0
// private var mBooleans = ArrayList<Boolean>() // private var mBooleans = ArrayList<Boolean>()
...@@ -53,7 +57,7 @@ class CleanActivity : AppCompatActivity() { ...@@ -53,7 +57,7 @@ class CleanActivity : AppCompatActivity() {
setContentView(R.layout.activity_clean) setContentView(R.layout.activity_clean)
initJunkScanCallBack() initJunkScanCallBack()
initView() initView()
if (MyApplication.mCleanSdk != null){ if (MyApplication.mCleanSdk != null) {
MyApplication.mCleanSdk?.cancel() MyApplication.mCleanSdk?.cancel()
// MyApplication.mCleanSdk?.startScan(junkScanCallback, true) // MyApplication.mCleanSdk?.startScan(junkScanCallback, true)
} }
...@@ -72,7 +76,7 @@ class CleanActivity : AppCompatActivity() { ...@@ -72,7 +76,7 @@ class CleanActivity : AppCompatActivity() {
CleanAdapter.isCleanOver = false CleanAdapter.isCleanOver = false
setViewOnclickListener() setViewOnclickListener()
var cleanBean = CleanBean() var cleanBean = CleanBean()
cleanBean.typeName = "Uninstall remains" cleanBean.typeName = "Uninstall remains"
mCleanBeans.add(cleanBean) mCleanBeans.add(cleanBean)
...@@ -91,18 +95,19 @@ class CleanActivity : AppCompatActivity() { ...@@ -91,18 +95,19 @@ class CleanActivity : AppCompatActivity() {
cleanBean = CleanBean() cleanBean = CleanBean()
cleanBean.typeName = "Other trash" cleanBean.typeName = "Other trash"
mCleanBeans.add(cleanBean) mCleanBeans.add(cleanBean)
mCleanAdapter = CleanAdapter(mCleanBeans, this) // mCleanAdapter = CleanAdapter(mCleanBeans, this)
mListView.adapter = mCleanAdapter mCleanAdapter2 = CleanAdapter2()
mListView.adapter = mCleanAdapter2
MyApplication.mCleanSdk?.startScan(junkScanCallback, false) MyApplication.mCleanSdk?.startScan(junkScanCallback, false)
MyApplication.mCleanSdk?.timeout(60000) MyApplication.mCleanSdk?.timeout(60000)
val handler = Handler(Looper.getMainLooper()) val handler = Handler(Looper.getMainLooper())
val runnable = object : Runnable{ val runnable = object : Runnable {
override fun run() { override fun run() {
if (mCount < 99){ if (mCount < 99) {
mCount ++ mCount++
mProgress?.setProgress(mCount) mProgress?.setProgress(mCount)
handler.postDelayed(this, 300) handler.postDelayed(this, 300)
} }
...@@ -130,210 +135,211 @@ class CleanActivity : AppCompatActivity() { ...@@ -130,210 +135,211 @@ class CleanActivity : AppCompatActivity() {
startActivity(Intent(this, SimilarImagesActivity::class.java)) startActivity(Intent(this, SimilarImagesActivity::class.java))
} }
findViewById<View>(R.id.clean_click_text).setOnClickListener { findViewById<View>(R.id.clean_click_text).setOnClickListener {
mAnimation.visibility = View.VISIBLE // mAnimation.visibility = View.VISIBLE
Thread(Runnable { // Thread(Runnable {
Thread.sleep(1000) // Thread.sleep(1000)
for (fileBeans in mCleanAdapter?.mFileCheckedItemList!!){ // for (fileBeans in mCleanAdapter?.mFileCheckedItemList!!) {
for (fileBean in fileBeans){ // for (fileBean in fileBeans) {
try { // try {
MyApplication.mCleanSdk?.delete(File(fileBean.filePath)) // MyApplication.mCleanSdk?.delete(File(fileBean.filePath))
}catch (e: Exception){ // } catch (e: Exception) {
e.printStackTrace() // e.printStackTrace()
} // }
} // }
} // }
runOnUiThread { // runOnUiThread {
mListView.visibility = View.GONE // mListView.visibility = View.GONE
mAnimation.visibility = View.GONE // mAnimation.visibility = View.GONE
findViewById<View>(R.id.clean_over_layout).visibility = View.VISIBLE // findViewById<View>(R.id.clean_over_layout).visibility = View.VISIBLE
} // }
}).start() // }).start()
// }
} }
} }
fun initJunkScanCallBack() {
fun initJunkScanCallBack(){ val TAG = "yanglin"
val TAG = "yanglin" junkScanCallback = object : JunkScanCallback {
junkScanCallback = object :JunkScanCallback{ override fun onStart() {
override fun onStart() {
// Log.e(TAG, "onStart: ", ) // Log.e(TAG, "onStart: ", )
} }
override fun error(p0: Int, p1: Throwable?) { override fun error(p0: Int, p1: Throwable?) {
Log.e(TAG, "error: $p0", ) Log.e(TAG, "error: $p0")
} }
override fun onAdJunkEmitOne(p0: AdvBean?) { override fun onAdJunkEmitOne(p0: AdvBean?) {
// Log.e(TAG, "onAdJunkEmitOne: $p0", ) // Log.e(TAG, "onAdJunkEmitOne: $p0", )
mHintTv?.text = "Scanning: ${p0?.path}.." mHintTv?.text = "Scanning: ${p0?.path}.."
} }
override fun onAdJunkSucceed() { override fun onAdJunkSucceed() {
// Log.e(TAG, "onAdJunkSucceed: ", ) // Log.e(TAG, "onAdJunkSucceed: ", )
// mCount +=10 // mCount +=10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
} }
override fun onApkJunkEmitOne(p0: ApkBean?) { override fun onApkJunkEmitOne(p0: ApkBean?) {
// Log.e(TAG, "onApkJunkEmitOne: $p0", ) // Log.e(TAG, "onApkJunkEmitOne: $p0", )
val fileBean = FileBean() val fileBean = FileBean()
fileBean.fileName = p0?.appName!! fileBean.fileName = p0?.appName!!
fileBean.drawable = p0.appIcon fileBean.drawable = p0.appIcon
fileBean.filePath = p0.path fileBean.filePath = p0.path
fileBean.fileSize = p0.size fileBean.fileSize = p0.size
fileBean.fileType = FileUtil.getFileType(File(p0.path)) fileBean.fileType = FileUtil.getFileType(File(p0.path))
mCleanBeans[1].fileBeans.add(fileBean) mCleanBeans[1].fileBeans.add(fileBean)
mHintTv?.text = "Scanning: ${p0.appName}.." mHintTv?.text = "Scanning: ${p0.appName}.."
} }
override fun onApkJunkScanSucceed() { override fun onApkJunkScanSucceed() {
Log.e(TAG, "onApkJunkScanSucceed: ", ) Log.e(TAG, "onApkJunkScanSucceed: ")
// mCount +=10 // mCount +=10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
mIsApkScanSuccess = true mIsApkScanSuccess = true
setAdapter() setAdapter()
} }
override fun onTmpJunkEmitOne(p0: TmpBean?) { override fun onTmpJunkEmitOne(p0: TmpBean?) {
// Log.e(TAG, "onTmpJunkEmitOne: $p0", ) // Log.e(TAG, "onTmpJunkEmitOne: $p0", )
val fileBean = FileBean() val fileBean = FileBean()
fileBean.fileName = p0?.name!! fileBean.fileName = p0?.name!!
fileBean.filePath = p0.path fileBean.filePath = p0.path
fileBean.fileSize = p0.size fileBean.fileSize = p0.size
fileBean.fileType = FileUtil.getFileType(File(p0.path)) fileBean.fileType = FileUtil.getFileType(File(p0.path))
mCleanBeans[4].fileBeans.add(fileBean) mCleanBeans[4].fileBeans.add(fileBean)
mHintTv?.text = "Scanning: ${p0.path}.." mHintTv?.text = "Scanning: ${p0.path}.."
} }
override fun onTmpJunkScanSucceed() { override fun onTmpJunkScanSucceed() {
// Log.e(TAG, "onTmpJunkScanSucceed: ", ) // Log.e(TAG, "onTmpJunkScanSucceed: ", )
// mCount +=10 // mCount +=10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
mIsTmpScanSuccess = true mIsTmpScanSuccess = true
setAdapter() setAdapter()
} }
override fun onLogJunkEmitOne(p0: LogBean?) { override fun onLogJunkEmitOne(p0: LogBean?) {
Log.e(TAG, "onLogJunkEmitOne: $p0", ) Log.e(TAG, "onLogJunkEmitOne: $p0")
// val fileBean = FileBean() // val fileBean = FileBean()
// fileBean.fileName = p0?.name!! // fileBean.fileName = p0?.name!!
// fileBean.filePath = p0.path // fileBean.filePath = p0.path
// fileBean.fileSize = p0.size // fileBean.fileSize = p0.size
// fileBean.fileType = FileUtil.getFileType(File(p0.path)) // fileBean.fileType = FileUtil.getFileType(File(p0.path))
// mCleanBeans[4].fileBeans.add(fileBean) // mCleanBeans[4].fileBeans.add(fileBean)
mHintTv?.text = "Scanning: ${p0?.path}.." mHintTv?.text = "Scanning: ${p0?.path}.."
} }
override fun onLogJunkScanSucceed() { override fun onLogJunkScanSucceed() {
// Log.e(TAG, "onLogJunkScanSucceed: ", ) // Log.e(TAG, "onLogJunkScanSucceed: ", )
// mCount += 10 // mCount += 10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
setAdapter() setAdapter()
} }
override fun onCacheJunkEmitOne(p0: CacheBean?) { override fun onCacheJunkEmitOne(p0: CacheBean?) {
// Log.e(TAG, "onCacheJunkEmitOne: $p0", ) // Log.e(TAG, "onCacheJunkEmitOne: $p0", )
val fileBean = FileBean() val fileBean = FileBean()
for (pathBean in p0?.pathBeen!!){ for (pathBean in p0?.pathBeen!!) {
fileBean.fileName = p0.packageName fileBean.fileName = p0.packageName
fileBean.filePath = pathBean.cleanPath fileBean.filePath = pathBean.cleanPath
fileBean.hint = p0.appName fileBean.hint = p0.appName
fileBean.fileSize = pathBean.size fileBean.fileSize = pathBean.size
mCleanBeans[3].fileBeans.add(fileBean) mCleanBeans[3].fileBeans.add(fileBean)
mHintTv?.text = "Scanning: ${p0.packageName}.." mHintTv?.text = "Scanning: ${p0.packageName}.."
}
} }
}
override fun onCacheJunkSucceed() { override fun onCacheJunkSucceed() {
// Log.e(TAG, "onCacheJunkSucceed: ", ) // Log.e(TAG, "onCacheJunkSucceed: ", )
// mCount +=10 // mCount +=10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
mIsCacheScanSuccess = true mIsCacheScanSuccess = true
setAdapter() setAdapter()
} }
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onResidualEmitOne(p0: ResidualBean?) { override fun onResidualEmitOne(p0: ResidualBean?) {
// Log.e(TAG, "onResidualEmitOne: $p0", ) // Log.e(TAG, "onResidualEmitOne: $p0", )
val path = p0!!.path val path = p0!!.path
mHintTv?.text = "Scanning: ${path!!}.." mHintTv?.text = "Scanning: ${path!!}.."
} }
override fun onResidualJunkSucceed() { override fun onResidualJunkSucceed() {
// Log.e(TAG, "onResidualJunkSucceed: ", ) // Log.e(TAG, "onResidualJunkSucceed: ", )
// mCount +=10 // mCount +=10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
setAdapter() setAdapter()
} }
override fun onThumbnailJunkEmitOne(p0: SDcardRubbishResult?) { override fun onThumbnailJunkEmitOne(p0: SDcardRubbishResult?) {
// Log.e(TAG, "onThumbnailJunkEmitOne: $p0", ) // Log.e(TAG, "onThumbnailJunkEmitOne: $p0", )
// val fileBean = FileBean() // val fileBean = FileBean()
// fileBean.fileName = p0?.name!! // fileBean.fileName = p0?.name!!
// fileBean.fileSize = p0.size // fileBean.fileSize = p0.size
// mCleanBeans[4].fileBeans.add(fileBean) // mCleanBeans[4].fileBeans.add(fileBean)
mHintTv?.text = "Scanning: ${p0!!.name}.." mHintTv?.text = "Scanning: ${p0!!.name}.."
} }
override fun onThumbnailJunkScanSucceed() { override fun onThumbnailJunkScanSucceed() {
// Log.e(TAG, "onThumbnailJunkScanSucceed: ", ) // Log.e(TAG, "onThumbnailJunkScanSucceed: ", )
setAdapter() setAdapter()
} }
override fun onMediaFileJunkEmitOne(p0: MEDIA_TYPE?, p1: MediaFile?) { override fun onMediaFileJunkEmitOne(p0: MEDIA_TYPE?, p1: MediaFile?) {
// Log.e(TAG, "onMediaFileJunkEmitOne: $p0, $p1", ) // Log.e(TAG, "onMediaFileJunkEmitOne: $p0, $p1", )
mHintTv?.text = "Scanning: ${p1!!.mApkName}.." mHintTv?.text = "Scanning: ${p1!!.mApkName}.."
} }
override fun onMediaFileJunkScanSucceed(p0: MEDIA_TYPE?) { override fun onMediaFileJunkScanSucceed(p0: MEDIA_TYPE?) {
// Log.e(TAG, "onMediaFileJunkScanSucceed: $p0", ) // Log.e(TAG, "onMediaFileJunkScanSucceed: $p0", )
// mCount +=10 // mCount +=10
// mProgress?.setProgress(mCount) // mProgress?.setProgress(mCount)
} }
override fun onTimeOut() { override fun onTimeOut() {
// Log.e(TAG, "onTimeOut: ", ) // Log.e(TAG, "onTimeOut: ", )
} }
}
} }
}
private fun setAdapter() { private fun setAdapter() {
if (mIsApkScanSuccess && mIsCacheScanSuccess && mIsTmpScanSuccess) { if (mIsApkScanSuccess && mIsCacheScanSuccess && mIsTmpScanSuccess) {
// MyApplication.mCleanSdk?. // MyApplication.mCleanSdk?.
findViewById<View>(R.id.battery_animation_btn).visibility = View.GONE findViewById<View>(R.id.battery_animation_btn).visibility = View.GONE
mCleanAdapter?.setData(mCleanBeans) mCleanAdapter2?.setData(mCleanBeans)
CleanAdapter.isCleanOver = true CleanAdapter.isCleanOver = true
var allSize: Long = 0 var allSize: Long = 0
for (size in mCleanAdapter?.mAllSizes!!) { // for (size in mCleanAdapter2?.mAllSizes!!) {
allSize += size // allSize += size
} // }
mCount = 0 mCount = 0
mProgress?.setProgress(100) mProgress?.setProgress(100)
mProgress?.visibility = View.GONE mProgress?.visibility = View.GONE
mHintTv?.visibility = View.GONE mHintTv?.visibility = View.GONE
mCleanBtn.visibility = View.VISIBLE mCleanBtn.visibility = View.VISIBLE
mCleanBtn.text = if (allSize > 1024 * 1024 * 1024) { mCleanBtn.text = if (allSize > 1024 * 1024 * 1024) {
"One-click cleanup of ${allSize / 1024 / 1024 / 1024} GB" "One-click cleanup of ${allSize / 1024 / 1024 / 1024} GB"
} else if (allSize > 1024 * 1024) { } else if (allSize > 1024 * 1024) {
"One-click cleanup of ${allSize / 1024 / 1024} MB" "One-click cleanup of ${allSize / 1024 / 1024} MB"
} else if (allSize > 1024) { } else if (allSize > 1024) {
"One-click cleanup of ${allSize / 1024} KB" "One-click cleanup of ${allSize / 1024} KB"
} else { } else {
"One-click cleanup of ${allSize} B" "One-click cleanup of ${allSize} B"
} }
}
} }
}
} }
\ No newline at end of file
package com.test.mydemo3.adapter package com.test.mydemo3.adapter
import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.test.mydemo3.R
import com.test.mydemo3.databinding.CleanListItemLayoutBinding
import com.test.mydemo3.databinding.FilesItemLayoutBinding
import com.test.mydemo3.model.CleanBean
import com.test.mydemo3.model.FileBean
class CleanAdapter2 : RecyclerView.Adapter<CleanAdapter2.AAA>() { class CleanAdapter2 : RecyclerView.Adapter<CleanAdapter2.AAA>() {
class AAA(view: View) : RecyclerView.ViewHolder(view) {
private val list = ArrayList<CleanBean>()
fun Int.inflate(parent: ViewGroup, attachToRoot: Boolean = false): View {
return LayoutInflater.from(parent.context).inflate(this, parent, attachToRoot)
}
class AAA(view: View) : RecyclerView.ViewHolder(view) {
val binding = CleanListItemLayoutBinding.bind(view)
} }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AAA { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AAA {
TODO("Not yet implemented") return AAA(R.layout.clean_list_item_layout.inflate(parent))
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
TODO("Not yet implemented") return list.size
} }
override fun onBindViewHolder(holder: AAA, position: Int) { override fun onBindViewHolder(holder: AAA, position: Int) {
TODO("Not yet implemented") val data = list[position]
holder.binding.cleanItemName.text = data.typeName
///展开逻辑
if (data.isListViewShow) {
holder.binding.cleanItemList.visibility = View.VISIBLE
val subAdapter = SubAdapter()
holder.binding.cleanItemList.adapter = subAdapter
subAdapter.setData(data.fileBeans)
} else {
holder.binding.cleanItemList.visibility = View.GONE
}
holder.binding.cleanItemUnfold.setOnClickListener {
data.isListViewShow = !data.isListViewShow
notifyItemChanged(position)
}
//选中的逻辑,先外层通过data的属性值是否选中,点击事假更新子类表选中状态下
} }
fun setData(datas: List<CleanBean>) {
list.clear()
list.addAll(datas)
notifyDataSetChanged()
}
inner Sub inner class SubAdapter : RecyclerView.Adapter<SubAdapter.BBB>() {
private val sibList = ArrayList<FileBean>()
inner class BBB(view: View) : RecyclerView.ViewHolder(view) {
val binding = FilesItemLayoutBinding.bind(view)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BBB {
return BBB(R.layout.files_item_layout.inflate(parent))
}
override fun getItemCount(): Int {
return sibList.size
}
override fun onBindViewHolder(holder: BBB, position: Int) {
val data = sibList[position]
holder.binding.fileItemName.text = data.fileName
//todo data通过状态值显示选中状态
// holder.binding.fileJoinToImg.isSelected=data.
}
fun setData(datas: List<FileBean>) {
sibList.clear()
sibList.addAll(datas)
notifyDataSetChanged()
}
}
} }
\ No newline at end of file
...@@ -6,109 +6,116 @@ ...@@ -6,109 +6,116 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".activity.CleanActivity"> tools:context=".activity.CleanActivity">
<LinearLayout <LinearLayout
android:layout_above="@+id/ad_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@+id/ad_layout"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:background="@color/style_background"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:background="@color/style_background"
android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<ImageView <ImageView
android:id="@+id/clean_quit_btn" android:id="@+id/clean_quit_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:src="@mipmap/quit"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_marginTop="16dp"/> android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:src="@mipmap/quit" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="20dp" android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:text="Clean" android:text="Clean"
android:textStyle="bold"
android:textColor="@color/white" android:textColor="@color/white"
android:layout_centerHorizontal="true" android:textSize="20dp"
android:layout_marginTop="12dp"/> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
<com.airbnb.lottie.LottieAnimationView <com.airbnb.lottie.LottieAnimationView
android:layout_above="@+id/clean_hint_text"
android:layout_below="@id/clean_quit_btn"
android:id="@+id/battery_animation_btn" android:id="@+id/battery_animation_btn"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
app:lottie_rawRes="@raw/memory" android:layout_above="@+id/clean_hint_text"
android:layout_below="@id/clean_quit_btn"
app:lottie_autoPlay="true" app:lottie_autoPlay="true"
app:lottie_loop="true"/> app:lottie_loop="true"
app:lottie_rawRes="@raw/memory" />
<TextView <TextView
android:id="@+id/clean_hint_text" android:id="@+id/clean_hint_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:textColor="@color/white" android:layout_marginBottom="12dp"
android:singleLine="true"
android:ellipsize="end" android:ellipsize="end"
android:layout_alignParentBottom="true" android:singleLine="true"
android:textSize="16dp" android:textColor="@color/white"
android:layout_marginBottom="12dp"/> android:textSize="16dp" />
</LinearLayout> </LinearLayout>
<ProgressBar <ProgressBar
android:id="@+id/clean_progress" android:id="@+id/clean_progress"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="8dp"
android:max="100"
android:indeterminate="false" android:indeterminate="false"
android:max="100"
android:progress="0" android:progress="0"
android:progressDrawable="@drawable/use_progress_bg"/> android:progressDrawable="@drawable/use_progress_bg" />
<ListView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/clean_list_view" android:id="@+id/clean_list_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:scrollbars="none"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"/> android:layout_marginEnd="16dp"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ad_layout" android:id="@+id/ad_layout"
android:layout_centerHorizontal="true" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_width="match_parent" android:orientation="vertical">
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/clean_click_text" android:id="@+id/clean_click_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="34dp" android:layout_height="34dp"
android:textStyle="bold" android:layout_marginStart="50dp"
android:visibility="gone"
android:textColor="@color/white"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="50dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:text="One-click cleanup of 414KB"
android:background="@drawable/bg_btn_sure_shape" android:background="@drawable/bg_btn_sure_shape"
android:gravity="center" android:gravity="center"
android:layout_marginStart="50dp" android:text="One-click cleanup of 414KB"
android:layout_marginEnd="50dp"/> android:textColor="@color/white"
<include layout="@layout/ad_layout"/> android:textStyle="bold"
android:visibility="gone" />
<include layout="@layout/ad_layout" />
</LinearLayout> </LinearLayout>
...@@ -116,73 +123,75 @@ ...@@ -116,73 +123,75 @@
android:id="@+id/clean_over_layout" android:id="@+id/clean_over_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:orientation="vertical"> android:orientation="vertical"
android:visibility="gone">
<include layout="@layout/ad_layout"/> <include layout="@layout/ad_layout" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:background="@drawable/bg_item_shape" android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"> android:background="@drawable/bg_item_shape">
<LinearLayout
android:id="@+id/layout_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/clean_antivirus_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/clean_antivirus" />
<LinearLayout <LinearLayout
android:id="@+id/layout_1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:layout_gravity="center_vertical"
android:layout_toRightOf="@id/clean_antivirus_image"
android:orientation="vertical">
<ImageView <TextView
android:id="@+id/clean_antivirus_image" android:id="@+id/clean_antivirus_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/clean_antivirus"/> android:text="Antivirus"
<LinearLayout android:textColor="@color/black"
android:layout_gravity="center_vertical" android:textSize="16dp"
android:orientation="vertical" android:textStyle="bold" />
android:layout_toRightOf="@id/clean_antivirus_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/clean_antivirus_text" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:text="No virus scan for a long time"
android:textColor="@color/black" android:textColor="@color/style_grey"
android:textStyle="bold" android:textSize="14sp" />
android:textSize="16dp"
android:text="Antivirus"/>
<TextView </LinearLayout>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/style_grey"
android:textSize="14sp"
android:text="No virus scan for a long time"/>
</LinearLayout> </LinearLayout>
</LinearLayout> <TextView
<TextView android:id="@+id/go_to_antivirus"
android:id="@+id/go_to_antivirus" android:layout_width="match_parent"
android:layout_below="@+id/layout_1" android:layout_height="36dp"
android:layout_width="match_parent" android:layout_below="@+id/layout_1"
android:layout_height="36dp" android:layout_marginStart="12dp"
android:layout_marginBottom="9dp" android:layout_marginTop="1dp"
android:layout_marginStart="12dp" android:layout_marginEnd="12dp"
android:text="View" android:layout_marginBottom="9dp"
android:gravity="center" android:background="@drawable/bg_btn_sure_shape"
android:textSize="19dp" android:gravity="center"
android:textColor="@color/white" android:text="View"
android:textStyle="bold" android:textColor="@color/white"
android:layout_marginEnd="12dp" android:textSize="19dp"
android:background="@drawable/bg_btn_sure_shape" android:textStyle="bold" />
android:layout_marginTop="1dp"/>
</RelativeLayout> </RelativeLayout>
...@@ -190,9 +199,9 @@ ...@@ -190,9 +199,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:background="@drawable/bg_item_shape" android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"> android:background="@drawable/bg_item_shape">
<LinearLayout <LinearLayout
android:id="@+id/layout_2" android:id="@+id/layout_2"
...@@ -203,48 +212,50 @@ ...@@ -203,48 +212,50 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/clean_battery"/> android:src="@mipmap/clean_battery" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_toRightOf="@id/clean_antivirus_image" android:layout_toRightOf="@id/clean_antivirus_image"
android:layout_width="wrap_content" android:orientation="vertical">
android:layout_height="wrap_content">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Battery Info"
android:textColor="@color/black" android:textColor="@color/black"
android:textStyle="bold"
android:textSize="16dp" android:textSize="16dp"
android:text="Battery Info"/> android:textStyle="bold" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="The power is lost too quicklycheck the reason"
android:textColor="@color/style_grey" android:textColor="@color/style_grey"
android:textSize="14sp" android:textSize="14sp" />
android:text="The power is lost too quicklycheck the reason"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/go_to_battery" android:id="@+id/go_to_battery"
android:layout_below="@+id/layout_2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_marginBottom="9dp" android:layout_below="@+id/layout_2"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:text="View" android:layout_marginTop="1dp"
android:gravity="center"
android:textSize="19dp"
android:textColor="@color/white"
android:textStyle="bold"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:layout_marginBottom="9dp"
android:background="@drawable/bg_btn_sure_shape" android:background="@drawable/bg_btn_sure_shape"
android:layout_marginTop="1dp"/> android:gravity="center"
android:text="View"
android:textColor="@color/white"
android:textSize="19dp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
...@@ -252,9 +263,9 @@ ...@@ -252,9 +263,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:background="@drawable/bg_item_shape" android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"> android:background="@drawable/bg_item_shape">
<LinearLayout <LinearLayout
android:id="@+id/layout_3" android:id="@+id/layout_3"
...@@ -265,48 +276,50 @@ ...@@ -265,48 +276,50 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/clean_empty_files"/> android:src="@mipmap/clean_empty_files" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_toRightOf="@id/clean_antivirus_image" android:layout_toRightOf="@id/clean_antivirus_image"
android:layout_width="wrap_content" android:orientation="vertical">
android:layout_height="wrap_content">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Scan Large Files"
android:textColor="@color/black" android:textColor="@color/black"
android:textStyle="bold"
android:textSize="16dp" android:textSize="16dp"
android:text="Scan Large Files"/> android:textStyle="bold" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Clean up large files"
android:textColor="@color/style_grey" android:textColor="@color/style_grey"
android:textSize="14sp" android:textSize="14sp" />
android:text="Clean up large files"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/go_to_scan_large" android:id="@+id/go_to_scan_large"
android:layout_below="@+id/layout_3"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_marginBottom="9dp" android:layout_below="@+id/layout_3"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:text="Scan" android:layout_marginTop="1dp"
android:gravity="center"
android:textSize="19dp"
android:textColor="@color/white"
android:textStyle="bold"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:layout_marginBottom="9dp"
android:background="@drawable/bg_btn_sure_shape" android:background="@drawable/bg_btn_sure_shape"
android:layout_marginTop="1dp"/> android:gravity="center"
android:text="Scan"
android:textColor="@color/white"
android:textSize="19dp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
...@@ -314,9 +327,9 @@ ...@@ -314,9 +327,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:background="@drawable/bg_item_shape" android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"> android:background="@drawable/bg_item_shape">
<LinearLayout <LinearLayout
android:id="@+id/layout_4" android:id="@+id/layout_4"
...@@ -327,48 +340,50 @@ ...@@ -327,48 +340,50 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@mipmap/clean_pictures"/> android:src="@mipmap/clean_pictures" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:orientation="vertical"
android:layout_toRightOf="@id/clean_antivirus_image" android:layout_toRightOf="@id/clean_antivirus_image"
android:layout_width="wrap_content" android:orientation="vertical">
android:layout_height="wrap_content">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Scan For Similar Images"
android:textColor="@color/black" android:textColor="@color/black"
android:textStyle="bold"
android:textSize="16dp" android:textSize="16dp"
android:text="Scan For Similar Images"/> android:textStyle="bold" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Clean up similar images"
android:textColor="@color/style_grey" android:textColor="@color/style_grey"
android:textSize="14sp" android:textSize="14sp" />
android:text="Clean up similar images"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/go_to_scan_similar_images" android:id="@+id/go_to_scan_similar_images"
android:layout_below="@+id/layout_4"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_marginBottom="9dp" android:layout_below="@+id/layout_4"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:text="Scan" android:layout_marginTop="1dp"
android:gravity="center"
android:textSize="19dp"
android:textColor="@color/white"
android:textStyle="bold"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:layout_marginBottom="9dp"
android:background="@drawable/bg_btn_sure_shape" android:background="@drawable/bg_btn_sure_shape"
android:layout_marginTop="1dp"/> android:gravity="center"
android:text="Scan"
android:textColor="@color/white"
android:textSize="19dp"
android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
...@@ -376,11 +391,11 @@ ...@@ -376,11 +391,11 @@
<FrameLayout <FrameLayout
android:id="@+id/clean_animation" android:id="@+id/clean_animation"
android:visibility="gone"
android:layout_marginTop="60dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="60dp"
android:background="@color/style_background" android:background="@color/style_background"
android:layout_height="match_parent"> android:visibility="gone">
</FrameLayout> </FrameLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:orientation="vertical" android:layout_height="wrap_content"
android:layout_height="wrap_content"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:id="@+id/clean_item_bar" android:id="@+id/clean_item_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp"> android:layout_height="50dp">
<TextView <TextView
android:id="@+id/clean_item_name" android:id="@+id/clean_item_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:textSize="16dp" android:text="Uninstall remains"
android:textColor="@color/black" android:textColor="@color/black"
android:text="Uninstall remains"/> android:textSize="16dp" />
<ImageView <ImageView
android:id="@+id/clean_item_unfold" android:id="@+id/clean_item_unfold"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginStart="12dp"
android:layout_toEndOf="@+id/clean_item_name" android:layout_toEndOf="@+id/clean_item_name"
android:src="@mipmap/unfold"/> android:src="@mipmap/unfold" />
<CheckBox <CheckBox
android:id="@+id/clean_item_check_box" android:id="@+id/clean_item_check_box"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:button="@null"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:drawableEnd="@drawable/bg_item_switch_selector"/> android:layout_centerVertical="true"
android:button="@null"
android:drawableEnd="@drawable/bg_item_switch_selector" />
<ImageView <ImageView
android:id="@+id/clean_item_more" android:id="@+id/clean_item_more"
...@@ -40,25 +43,26 @@ ...@@ -40,25 +43,26 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@mipmap/more"/> android:src="@mipmap/more" />
<TextView <TextView
android:id="@+id/file_item_size" android:id="@+id/file_item_size"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="23MB"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_marginEnd="46dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:textColor="#DBDBDB"/> android:layout_marginEnd="46dp"
android:text="23MB"
android:textColor="#DBDBDB" />
</RelativeLayout> </RelativeLayout>
<ListView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/clean_item_list" android:id="@+id/clean_item_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
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