From f6d62b42031f317f80083a424e9610d2ced0eea5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 23 Oct 2021 23:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/widget/anima/explosion_field/ExplosionView.kt | 3 +-- .../io/legado/app/ui/widget/recycler/DividerNoLast.kt | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionView.kt b/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionView.kt index bfe887ad0..606e81b6c 100644 --- a/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionView.kt @@ -77,12 +77,11 @@ class ExplosionView @JvmOverloads constructor(context: Context, attrs: Attribute explosion.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator) { mExplosions.remove(animation) - if (view != null) { + view?.let { view.scaleX = 1f view.scaleY = 1f view.alpha = 1f view.setOnClickListener(mOnClickListener)//set event - } } }) diff --git a/app/src/main/java/io/legado/app/ui/widget/recycler/DividerNoLast.kt b/app/src/main/java/io/legado/app/ui/widget/recycler/DividerNoLast.kt index 92ac1a672..c1db3b6fc 100644 --- a/app/src/main/java/io/legado/app/ui/widget/recycler/DividerNoLast.kt +++ b/app/src/main/java/io/legado/app/ui/widget/recycler/DividerNoLast.kt @@ -4,10 +4,10 @@ import android.content.Context import android.graphics.Canvas import android.graphics.Rect import android.graphics.drawable.Drawable -import android.util.Log import android.view.View import android.widget.LinearLayout import androidx.recyclerview.widget.RecyclerView +import timber.log.Timber import kotlin.math.roundToInt @@ -23,7 +23,6 @@ class DividerNoLast(context: Context, orientation: Int) : const val VERTICAL = LinearLayout.VERTICAL } - private val tag = "DividerItem" private val attrs = intArrayOf(android.R.attr.listDivider) private var mDivider: Drawable? = null @@ -39,10 +38,7 @@ class DividerNoLast(context: Context, orientation: Int) : val a = context.obtainStyledAttributes(attrs) mDivider = a.getDrawable(0) if (mDivider == null) { - Log.w( - tag, "@android:attr/listDivider was not set in the theme used for this " - + "DividerItemDecoration. Please set that attribute all call setDrawable()" - ) + Timber.w("@android:attr/listDivider was not set in the theme used for this DividerItemDecoration. Please set that attribute all call setDrawable()") } a.recycle() setOrientation(orientation)