diff --git a/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionAnimator.kt b/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionAnimator.kt index 6542ea55f..582f7239c 100644 --- a/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionAnimator.kt +++ b/app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionAnimator.kt @@ -16,14 +16,17 @@ package io.legado.app.ui.widget.anima.explosion_field import android.animation.ValueAnimator +import android.annotation.SuppressLint import android.graphics.* import android.view.View import android.view.animation.AccelerateInterpolator import java.util.* import kotlin.math.pow +@SuppressLint("Recycle") class ExplosionAnimator(private val mContainer: View, bitmap: Bitmap, bound: Rect) : ValueAnimator() { + private val mPaint: Paint = Paint() private val mParticles: Array private val mBound: Rect = Rect(bound) 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 7345e7ed9..bfe887ad0 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 @@ -24,8 +24,8 @@ import android.graphics.Canvas import android.graphics.Rect import android.media.MediaPlayer import android.util.AttributeSet -import android.util.Log import android.view.View +import timber.log.Timber import java.util.* @@ -99,8 +99,6 @@ class ExplosionView @JvmOverloads constructor(context: Context, attrs: Attribute view.getGlobalVisibleRect(r) val location = IntArray(2) getLocationOnScreen(location) - // getLocationInWindow(location); - // view.getLocationInWindow(location); r.offset(-location[0], -location[1]) r.inset(-mExpandInset[0], -mExpandInset[1]) val startDelay = 100 @@ -128,11 +126,11 @@ class ExplosionView @JvmOverloads constructor(context: Context, attrs: Attribute } override fun onAnimationCancel(animator: Animator) { - Log.i("PRUEBA", "CANCEL") + Timber.i("CANCEL") } override fun onAnimationRepeat(animator: Animator) { - Log.i("PRUEBA", "REPEAT") + Timber.i("REPEAT") } })