Commit 726af9d9 authored by songjianyu's avatar songjianyu

[修复] 脚本混淆有问题的变量名

parent add4f08c
......@@ -51,15 +51,15 @@ class BatteryHeadAdapter : BaseQuickAdapter<BatteryHead, CommonViewHolder>() {
return CommonViewHolder(R.layout.item_battery_head.inflate(parent))
}
fun setText(v: TextView, time: Int) {
fun setText(item: TextView, time: Int) {
var h = time / 60
var m = time % 60
val strH = if (h < 10) "0$h" else h.toString()
val strM = if (m < 10) "0$m" else m.toString()
val text1 = "$strH h "
val text2 = "$strM m"
v.text = buildSpannableString(text1, strH)
v.append(buildSpannableString(text2, strM))
item.text = buildSpannableString(text1, strH)
item.append(buildSpannableString(text2, strM))
}
fun buildSpannableString(fullString: String, tagString: String): SpannableString {
......
......@@ -28,9 +28,9 @@ class BatteryInfoAdapter : BaseQuickAdapter<List<BatteryInfoBean>, CommonViewHol
item ?: return
if (!initSub) {
initSub = true
val rv = holder.itemView.findViewById<RecyclerView>(R.id.rv)
rv.layoutManager = GridLayoutManager(holder.itemView.context, 2)
rv.adapter = subAdapter
val recyclerView = holder.itemView.findViewById<RecyclerView>(R.id.rv)
recyclerView.layoutManager = GridLayoutManager(holder.itemView.context, 2)
recyclerView.adapter = subAdapter
}
subAdapter.submitList(item)
}
......
......@@ -184,8 +184,8 @@ class LargeFileCleanActivity : BaseActivity<ActivityLargeFileCleanBinding>(Activ
clearTab()
}
fun setTextSize(view: TextView, content: String, total: Long) {
view.text = if (total > 0) "$content (${Utils.getSizeFormat(total)})" else content
fun setTextSize(item: TextView, content: String, total: Long) {
item.text = if (total > 0) "$content (${Utils.getSizeFormat(total)})" else content
}
@SuppressLint("NotifyDataSetChanged")
......
......@@ -163,8 +163,8 @@ class SimilarPhotosActivity : BaseActivity<ActivitySimilarPhotosBinding>(Activit
setTextSize(binding.tvDelete, getString(R.string.delete), total)
}
fun setTextSize(view: TextView, content: String, total: Long) {
view.text = if (total > 0) "$content (${Utils.getSizeFormat(total)})" else content
fun setTextSize(item: TextView, content: String, total: Long) {
item.text = if (total > 0) "$content (${Utils.getSizeFormat(total)})" else content
}
......
......@@ -8,7 +8,7 @@ import android.widget.ProgressBar
object MyAnimationUtils {
fun rotation(view: View, durationTime: Long = 2000) {
fun rotation(item: View, durationTime: Long = 2000) {
ValueAnimator.ofFloat(0f, 360f).apply {
duration = durationTime
interpolator = LinearInterpolator()
......@@ -16,7 +16,7 @@ object MyAnimationUtils {
repeatMode = ValueAnimator.RESTART
addUpdateListener { animation ->
val animatedValue = animation.animatedValue as Float
view.rotation = animatedValue
item.rotation = animatedValue
}
}.start()
}
......
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