From 646958ecd0a4dd0cee48049b5e7cfd5c056ec523 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 21 Oct 2020 21:57:59 +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 --- .../io/legado/app/ui/book/read/ReadMenu.kt | 5 ++--- .../anima/explosion_field/ExplosionView.kt | 22 +++---------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt index 40af2c32d..d1480ac81 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.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 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 9eef530f2..7345e7ed9 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 @@ -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() 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)) }