Commit 951d7815 authored by wanglei's avatar wanglei

...

parent aa77a6b2
...@@ -84,6 +84,8 @@ dependencies { ...@@ -84,6 +84,8 @@ dependencies {
implementation("com.github.angcyo.DslTablayout:TabLayout:3.5.5") implementation("com.github.angcyo.DslTablayout:TabLayout:3.5.5")
implementation("com.github.angcyo.DslTablayout:ViewPager2Delegate:3.5.5") implementation("com.github.angcyo.DslTablayout:ViewPager2Delegate:3.5.5")
implementation("com.airbnb.android:lottie:6.4.0") implementation("com.airbnb.android:lottie:6.4.0")
implementation("com.github.pokercc:ExpandableRecyclerView:0.9.3")
//mlkit //mlkit
implementation("com.google.android.gms:play-services-mlkit-document-scanner:16.0.0-beta1") implementation("com.google.android.gms:play-services-mlkit-document-scanner:16.0.0-beta1")
......
package com.base.pdfviewerscannerwhite.bean
import android.animation.ValueAnimator
import android.graphics.drawable.Drawable
data class ParentBean(
val icon: Int = 0,
val tittle: String = "",
val childItem: List<ChildBean> = arrayListOf(),
) {
var playAnimation: Boolean = true
var isExpand: Boolean = true
var isSelect: Boolean = true
var finished: Boolean = false
var rotateValueAnimator: ValueAnimator? = null
}
data class ChildBean(
val icon: Int = 0,
val path: String = "",
) {
var playAnimation: Boolean = true
var apkIcon: Drawable? = null
var isSelect: Boolean = true
}
\ No newline at end of file
package com.base.pdfviewerscannerwhite.ui.cleanjunk
import android.animation.ValueAnimator
import android.graphics.Color
import android.view.animation.LinearInterpolator
import android.widget.Toast
import androidx.activity.addCallback
import androidx.core.animation.doOnEnd
import androidx.core.view.updatePadding
import com.base.pdfviewerscannerwhite.ads.admob.AdmobInterstitialUtils
import com.base.pdfviewerscannerwhite.databinding.ActivityLayoutCleanupingBinding
import com.base.pdfviewerscannerwhite.helper.BaseActivity
import com.base.pdfviewerscannerwhite.utils.AppPreferences
import com.base.pdfviewerscannerwhite.utils.BarUtils
import com.base.pdfviewerscannerwhite.utils.updateMediaStore
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import java.io.File
import kotlin.random.Random
/**
* 实际清理页面
*/
class CleaningActivity : BaseActivity<ActivityLayoutCleanupingBinding>() {
override val binding: ActivityLayoutCleanupingBinding by lazy {
ActivityLayoutCleanupingBinding.inflate(layoutInflater)
}
private val intentSize by lazy {
intent.getLongExtra("size", -1)
}
private val listPath by lazy {
intent.getStringArrayExtra("list") ?: arrayOf()
}
override fun initView() {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
MainScope().launch(Dispatchers.IO) {
try {
listPath.forEach {
val file = File(it)
runCatching { file.deleteRecursively() }
}
updateMediaStore(listPath)
} catch (_: Exception) {
} finally {
}
}
playAnm()
}
override fun initListener() {
onBackPressedDispatcher.addCallback {
Toast.makeText(this@CleaningActivity, "wait a moment", Toast.LENGTH_SHORT).show()
}
}
private fun playAnm() {
ValueAnimator.ofFloat(0f, 360f).run {
duration = 1000
repeatMode = ValueAnimator.RESTART
repeatCount = ValueAnimator.INFINITE
interpolator = LinearInterpolator()
addUpdateListener {
binding.idYuan.rotation = it.animatedValue as Float
}
start()
}
ValueAnimator.ofInt(0, 100).run {
duration = Random.nextLong(7000, 8000)
interpolator = LinearInterpolator()
addUpdateListener {
binding.idTvJd.text = "${it.animatedValue as Int}"
}
doOnEnd {
val isCleanEndAdSp = AppPreferences.getInstance().getString("isCleanEndAdSp", "1").toInt()
if (isCleanEndAdSp == 1) {
AdmobInterstitialUtils.showInterstitialAd(this@CleaningActivity) {
// startActivity(
// Intent(this@com.base.pdfviewerscannerwhite.ui.cleanjunk.CleaningActivity, ResultActivity::class.java).putExtra("from", JUNK_CLEANER)
// .putExtra("clean_size", intentSize)
// )
finish()
}
} else {
// startActivity(
// Intent(this@com.base.pdfviewerscannerwhite.ui.cleanjunk.CleaningActivity, ResultActivity::class.java).putExtra("from", JUNK_CLEANER)
// .putExtra("clean_size", intentSize)
// )
finish()
}
}
start()
}
}
}
\ No newline at end of file
package com.base.pdfviewerscannerwhite.ui.cleanjunk
import android.annotation.SuppressLint
import android.view.ViewGroup
import android.view.animation.AnimationUtils
import com.base.pdfviewerscannerwhite.R
import com.base.pdfviewerscannerwhite.bean.ParentBean
import com.base.pdfviewerscannerwhite.databinding.ItemJunkChildBinding
import com.base.pdfviewerscannerwhite.databinding.ItemJunkParentBinding
import com.base.pdfviewerscannerwhite.utils.KotlinExt.toFormatSize
import com.base.pdfviewerscannerwhite.utils.XmlEx.inflate
import pokercc.android.expandablerecyclerview.ExpandableAdapter
import java.io.File
class JunkExpandAdapter(private val selectAction: (size: Long) -> Unit) : ExpandableAdapter<ExpandableAdapter.ViewHolder>() {
private val beanList = arrayListOf<ParentBean>()
override fun getChildCount(groupPosition: Int): Int {
return beanList[groupPosition].childItem.size
}
override fun getGroupCount(): Int {
return beanList.size
}
override fun onCreateChildViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(R.layout.item_junk_child.inflate(viewGroup))
}
override fun onCreateGroupViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(R.layout.item_junk_parent.inflate(viewGroup))
}
override fun onBindChildViewHolder(holder: ViewHolder, groupPosition: Int, childPosition: Int, payloads: List<Any>) {
val binding = ItemJunkChildBinding.bind(holder.itemView)
val parentBean = beanList[groupPosition]
val childBeanList = parentBean.childItem
val childBean = childBeanList[childPosition]
if (payloads.isEmpty()) {
if (childBean.apkIcon == null) binding.iv.setImageResource(childBean.icon) else binding.iv.setImageDrawable(childBean.apkIcon)
val file = File(childBean.path)
binding.tvName.text = file.name
binding.tvSize.text = file.length().toFormatSize()
binding.ivSelector.isSelected = childBean.isSelect
binding.root.setOnClickListener {
childBean.isSelect = !childBean.isSelect
notifyChildChange(groupPosition, childPosition, "aaa")
val allSelect = childBeanList.all { it.isSelect }
if (parentBean.isSelect != allSelect) {
parentBean.isSelect = allSelect
notifyGroupChange(groupPosition, "aa")
}
selectChange()
}
if (childBean.playAnimation) {
val slideInFromRight = AnimationUtils.loadAnimation(holder.itemView.context, R.anim.slide_in_from_right)
binding.root.startAnimation(slideInFromRight)
childBean.playAnimation = false
}
} else {
binding.ivSelector.isSelected = childBean.isSelect
}
}
@SuppressLint("NotifyDataSetChanged")
override fun onBindGroupViewHolder(holder: ViewHolder, groupPosition: Int, expand: Boolean, payloads: List<Any>) {
val binding = ItemJunkParentBinding.bind(holder.itemView)
val bean = beanList[groupPosition]
bean.isExpand = expand
if (bean.isExpand) {
binding.ivExpand.setImageResource(R.mipmap.zhankai)
} else {
binding.ivExpand.setImageResource(R.mipmap.shouqi)
}
if (payloads.isEmpty()) {
binding.tvName.text = bean.tittle
val size = bean.childItem.sumOf { File(it.path).length() }
binding.tvSize.text = size.toFormatSize()
binding.flExpand.setOnClickListener {
bean.isExpand = !bean.isExpand
notifyGroupChange(groupPosition, "aa")
if (bean.isExpand) {
expandGroup(groupPosition, true)
} else {
collapseGroup(groupPosition, true)
}
}
binding.ivSelector.isSelected = bean.isSelect
binding.flSelector.setOnClickListener {
bean.isSelect = !bean.isSelect
bean.childItem.forEach { it.isSelect = bean.isSelect }
notifyDataSetChanged()
selectChange()
}
if (bean.playAnimation) {
val slideInFromRight = AnimationUtils.loadAnimation(holder.itemView.context, R.anim.slide_in_from_right)
binding.root.startAnimation(slideInFromRight)
bean.playAnimation = false
}
} else {
binding.ivSelector.isSelected = bean.isSelect
}
}
override fun onGroupViewHolderExpandChange(holder: ViewHolder, groupPosition: Int, animDuration: Long, expand: Boolean) {}
@SuppressLint("NotifyDataSetChanged")
fun addData(list: List<ParentBean>, clear: Boolean = true) {
if (clear) {
beanList.clear()
}
beanList.addAll(list)
notifyDataSetChanged()
}
private fun selectChange() {
val size = beanList.flatMap { it.childItem }.filter { it.isSelect }.sumOf { bean -> File(bean.path).length() }
selectAction.invoke(size)
}
fun getChoosePath(): List<String> {
return beanList.flatMap { it.childItem }.filter { it.isSelect }.map { it.path }
}
}
package com.base.pdfviewerscannerwhite.ui.cleanjunk
import android.animation.ValueAnimator
import android.view.View
import android.view.ViewGroup
import android.view.animation.AnimationUtils
import android.view.animation.LinearInterpolator
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.base.pdfviewerscannerwhite.R
import com.base.pdfviewerscannerwhite.bean.ParentBean
import com.base.pdfviewerscannerwhite.databinding.ItemJunkParentScanBinding
import com.base.pdfviewerscannerwhite.utils.XmlEx.inflate
class JunkScanAdapter : RecyclerView.Adapter<JunkScanAdapter.ParentViewHolder>() {
private val beanList = arrayListOf<ParentBean>()
inner class ParentViewHolder(view: View) : RecyclerView.ViewHolder(view)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ParentViewHolder {
return ParentViewHolder(R.layout.item_junk_parent_scan.inflate(parent))
}
override fun getItemCount(): Int {
return beanList.size
}
override fun onBindViewHolder(holder: ParentViewHolder, position: Int) {
val bean = beanList[position]
val context = holder.itemView.context
val binding = ItemJunkParentScanBinding.bind(holder.itemView)
binding.ivIcon.setImageResource(bean.icon)
binding.tvTitle.text = bean.tittle
if (bean.playAnimation) {
val slideInFromRight = AnimationUtils.loadAnimation(holder.itemView.context, R.anim.slide_in_from_right)
binding.ll.startAnimation(slideInFromRight)
bean.playAnimation = false
}
if (bean.finished) {
binding.ivRotate.rotation = 0f
binding.ivRotate.setImageDrawable(ContextCompat.getDrawable(context, R.mipmap.xuan))
bean.rotateValueAnimator?.cancel()
bean.rotateValueAnimator = null
} else {
bean.rotateValueAnimator = ValueAnimator.ofFloat(0f, 360f).apply {
duration = 1000
repeatMode = ValueAnimator.RESTART
repeatCount = ValueAnimator.INFINITE
interpolator = LinearInterpolator()
addUpdateListener {
binding.ivRotate.rotation = it.animatedValue as Float
}
start()
}
}
}
fun addData(bean: ParentBean, position: Int) {
beanList.add(bean)
notifyItemChanged(position)
}
fun setFinishScan(position: Int) {
val bean = beanList[position]
bean.finished = true
notifyItemChanged(position)
}
}
\ No newline at end of file
package com.base.pdfviewerscannerwhite.utils
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.flow.MutableSharedFlow
import java.io.File
import java.util.LinkedList
object FileHelp {
fun CoroutineScope.getFileFolder(
flow: MutableSharedFlow<String>? = null,
file: File,
filter: (file: File) -> Boolean
) = async(Dispatchers.IO) {
val set = HashSet<File>()
//添加第一层文件到链表
val linkList = LinkedList<File>()
val fileList = file.listFiles()
fileList?.forEach {
if (it.isDirectory) {
flow?.emit(it.absolutePath)
linkList.add(it)
if (filter.invoke(it)) {
set.add(it)
}
}
}
//链表取文件
var tempFile: File
while (!linkList.isEmpty()) {
tempFile = linkList.removeFirst()
val tempFileList = tempFile.listFiles()
tempFileList?.forEach {
if (it.isDirectory) {
flow?.emit(it.absolutePath)
linkList.add(it)
if (filter.invoke(it)) {
set.add(it)
}
}
}
}
set.toList()
}
fun getFileFolder(
file: File,
filter: (file: File) -> Boolean
): List<File> {
val set = HashSet<File>()
//添加第一层文件到链表
val linkList = LinkedList<File>()
val fileList = file.listFiles()
fileList?.forEach {
if (it.isDirectory) {
linkList.add(it)
if (filter.invoke(it)) {
set.add(it)
}
}
}
//链表取文件
var tempFile: File
while (!linkList.isEmpty()) {
tempFile = linkList.removeFirst()
val tempFileList = tempFile.listFiles()
tempFileList?.forEach {
if (it.isDirectory) {
linkList.add(it)
if (filter.invoke(it)) {
set.add(it)
}
}
}
}
return set.toList()
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="800"
android:fillAfter="true"
android:fromXDelta="100%p"
android:startOffset="0"
android:toXDelta="0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="169dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/id_bottom_content"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/id_yuan"
android:layout_width="229dp"
android:layout_height="229dp"
android:layout_gravity="center_horizontal"
android:src="@mipmap/qingliz" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="124dp"
android:layout_height="124dp"
android:layout_gravity="center"
android:src="@mipmap/qingliyuan" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
<TextView
android:id="@+id/id_tv_jd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="@color/white"
android:textSize="48sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="%"
android:textColor="@color/white"
android:textSize="14sp"
tools:ignore="HardcodedText" />
</androidx.appcompat.widget.LinearLayoutCompat>
</FrameLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/id_bottom_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="150dp"
android:text="Wait a moment..."
android:textColor="#666666"
android:textSize="16sp"
tools:ignore="HardcodedText" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activity.cleanjunk.ScanJunkActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_top"
android:layout_width="match_parent"
android:layout_height="300dp"
android:background="@mipmap/lan_bg"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/ll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/fl_fanhui"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="15dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@mipmap/b_fanhui"
tools:ignore="ContentDescription,MissingPrefix" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="Clean Junk"
android:textColor="@color/white"
android:textSize="19sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:id="@+id/tv_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="0"
android:textColor="@color/white"
android:textSize="54sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll"
app:layout_constraintVertical_bias="0.3"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tv_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_size" />
<ProgressBar
android:id="@+id/progress_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="16dp"
android:indeterminate="true"
android:indeterminateTint="@color/white"
android:indeterminateTintMode="src_atop"
app:layout_constraintBottom_toTopOf="@id/tv_path" />
<TextView
android:id="@+id/tv_path"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="#1A000000"
android:ellipsize="middle"
android:gravity="center_vertical"
android:paddingHorizontal="15dp"
android:singleLine="true"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
tools:ignore="RtlSymmetry"
tools:layout_editor_absoluteX="0dp"
tools:text="Scan in progress:/storage/emulated/0/qitu/download" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/tv_btn"
app:layout_constraintTop_toBottomOf="@id/cl_top">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<pokercc.android.expandablerecyclerview.ExpandableRecyclerView
android:id="@+id/rv_ex"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</FrameLayout>
<TextView
android:id="@+id/tv_btn"
android:layout_width="338dp"
android:layout_height="50dp"
android:layout_marginBottom="30dp"
android:background="@drawable/bg_clean_btn"
android:enabled="false"
android:gravity="center"
android:text="Scan in progress"
android:textColor="#AEAEB0"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="HardcodedText" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="10dp">
<ImageView
android:id="@+id/iv"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_marginVertical="6dp"
tools:ignore="ContentDescription"
tools:src="@mipmap/d_reseiual" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="8dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="middle"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="14sp"
tools:text="Ali Webpage ads" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="Suggestion: Clean up"
android:textColor="#999999"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:id="@+id/tv_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="#FF8523"
android:textSize="14sp"
tools:text="12.72 MB" />
<ImageView
android:id="@+id/iv_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="16dp"
android:src="@drawable/bg_circle_selector"
tools:ignore="ContentDescription" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/fl_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
android:padding="10dp">
<ImageView
android:id="@+id/iv_expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@mipmap/zhankai"
tools:ignore="ContentDescription" />
</FrameLayout>
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="8dp"
android:layout_weight="1"
android:textColor="@color/black"
android:textSize="15sp"
tools:text="Residual File" />
<TextView
android:id="@+id/tv_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="#FF8523"
android:textSize="14sp"
tools:text="12.72 MB" />
<FrameLayout
android:id="@+id/fl_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="6dp"
android:padding="10dp">
<ImageView
android:id="@+id/iv_selector"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bg_circle_selector"
tools:ignore="ContentDescription" />
</FrameLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#E5E6EB"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp">
<ImageView
android:id="@+id/iv_rotate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/jiazai"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<LinearLayout
android:id="@+id/ll"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_rotate"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginVertical="12dp"
tools:ignore="ContentDescription"
tools:src="@mipmap/d_reseiual" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="11dp"
android:text="Residual File"
android:textColor="@color/black"
android:textSize="15sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="1px"
android:background="#E5E6EB"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/ll" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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