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)