aboutsummaryrefslogtreecommitdiff
path: root/core-ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'core-ui/src')
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
index 726f5b6..91e6b67 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
@@ -25,6 +25,7 @@ import android.view.animation.AnimationUtils
import android.widget.TextSwitcher
import android.widget.TextView
import androidx.core.widget.TextViewCompat
+import ca.allanwang.kau.kotlin.lazyUi
import ca.allanwang.kau.ui.R
import java.util.EmptyStackException
import java.util.Stack
@@ -66,10 +67,10 @@ class TextSlider @JvmOverloads constructor(
private val prevIn: Int,
private val prevOut: Int
) {
- val NEXT_IN: Animation by lazy { AnimationUtils.loadAnimation(context, nextIn) }
- val NEXT_OUT: Animation by lazy { AnimationUtils.loadAnimation(context, nextOut) }
- val PREV_IN: Animation by lazy { AnimationUtils.loadAnimation(context, prevIn) }
- val PREV_OUT: Animation by lazy { AnimationUtils.loadAnimation(context, prevOut) }
+ val NEXT_IN: Animation by lazyUi { AnimationUtils.loadAnimation(context, nextIn) }
+ val NEXT_OUT: Animation by lazyUi { AnimationUtils.loadAnimation(context, nextOut) }
+ val PREV_IN: Animation by lazyUi { AnimationUtils.loadAnimation(context, prevIn) }
+ val PREV_OUT: Animation by lazyUi { AnimationUtils.loadAnimation(context, prevOut) }
}
companion object {