pull/436/head^2
gedoor 4 years ago
parent b00d857ec0
commit 646958ecd0
  1. 5
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt
  2. 22
      app/src/main/java/io/legado/app/ui/widget/anima/explosion_field/ExplosionView.kt

@ -26,9 +26,8 @@ import org.jetbrains.anko.sdk27.listeners.onLongClick
*/
class ReadMenu @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
var cnaShowMenu: Boolean = false
private val callBack: CallBack? get() = activity as? CallBack
private lateinit var menuTopIn: Animation

@ -30,7 +30,8 @@ import java.util.*
@Suppress("unused")
class ExplosionView : View {
class ExplosionView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
View(context, attrs) {
private var customDuration = ExplosionAnimator.DEFAULT_DURATION
private var idPlayAnimationEffect = 0
@ -40,24 +41,7 @@ class ExplosionView : View {
private val mExplosions = ArrayList<ExplosionAnimator>()
private val mExpandInset = IntArray(2)
constructor(context: Context) : super(context) {
init()
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
init()
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(
context,
attrs,
defStyleAttr
) {
init()
}
private fun init() {
init {
Arrays.fill(mExpandInset, Utils.dp2Px(32))
}

Loading…
Cancel
Save