aboutsummaryrefslogtreecommitdiff
path: root/library/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/main')
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt15
1 files changed, 15 insertions, 0 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt b/library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt
index 50b1848..b8735bb 100644
--- a/library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt
+++ b/library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt
@@ -2,6 +2,7 @@ package ca.allanwang.kau.views
import android.content.Context
import android.graphics.Color
+import android.support.annotation.AnimRes
import android.support.v4.widget.TextViewCompat
import android.text.TextUtils
import android.util.AttributeSet
@@ -24,6 +25,20 @@ class TextSlider @JvmOverloads constructor(context: Context, attrs: AttributeSet
val titleStack: Stack<CharSequence?> = Stack()
+ inner class Animations(
+ private @param: AnimRes val nextIn: Int,
+ private @param: AnimRes val nextOut: Int,
+ private @param: AnimRes val prevIn: Int,
+ private @param: AnimRes val prevOut: Int
+ ) {
+
+ val NEXT_IN: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_left) }
+ val NEXT_OUT: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_right) }
+ val PREV_IN: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_top) }
+ val PREV_OUT: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_bottom) }
+
+ }
+
private val SLIDE_IN_LEFT: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_left) }
private val SLIDE_IN_RIGHT: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_right) }
private val SLIDE_IN_TOP: Animation by lazy { AnimationUtils.loadAnimation(context, R.anim.kau_slide_in_top) }