Replace custom visibility extension functions
This commit is contained in:
@@ -6,8 +6,8 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.view.ViewAnimationUtils
|
||||
import eu.kanade.tachiyomi.util.view.invisible
|
||||
import eu.kanade.tachiyomi.util.view.visible
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.core.view.isVisible
|
||||
|
||||
class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
View(context, attrs) {
|
||||
@@ -21,7 +21,7 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
*/
|
||||
fun hideRevealEffect(centerX: Int, centerY: Int, initialRadius: Int) {
|
||||
// Make the view visible.
|
||||
this.visible()
|
||||
this.isVisible = true
|
||||
|
||||
// Create the animation (the final radius is zero).
|
||||
val anim = ViewAnimationUtils.createCircularReveal(
|
||||
@@ -35,7 +35,7 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
anim.addListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
super.onAnimationEnd(animation)
|
||||
this@RevealAnimationView.invisible()
|
||||
this@RevealAnimationView.isInvisible = true
|
||||
}
|
||||
})
|
||||
|
||||
@@ -52,7 +52,7 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
* @return sdk version lower then 21
|
||||
*/
|
||||
fun showRevealEffect(centerX: Int, centerY: Int, listener: Animator.AnimatorListener): Boolean {
|
||||
this.visible()
|
||||
this.isVisible = true
|
||||
|
||||
val height = this.height
|
||||
|
||||
|
||||
Reference in New Issue
Block a user