Commit 28cd9e39 authored by wanglei's avatar wanglei

aaa

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