pull/1403/head
gedoor 3 years ago
parent ff85af1758
commit f6d62b4203
  1. 3
      app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionView.kt
  2. 8
      app/src/main/java/io/legado/app/ui/widget/recycler/DividerNoLast.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
}
}
})

@ -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)

Loading…
Cancel
Save