diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-27 11:37:45 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-27 11:37:45 -0700 |
commit | 8179e50208192e2b18b4df3bfc100d9cf779891a (patch) | |
tree | 96e59c13660b9f17d5a95bd506746497cdc5dff1 /library/src | |
parent | 7871b27bcc5cffcc5bc6ca380d7ad4456cb40eda (diff) | |
download | kau-8179e50208192e2b18b4df3bfc100d9cf779891a.tar.gz kau-8179e50208192e2b18b4df3bfc100d9cf779891a.tar.bz2 kau-8179e50208192e2b18b4df3bfc100d9cf779891a.zip |
Exclude stdlib in rxbinding
Diffstat (limited to 'library/src')
-rw-r--r-- | library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt | 15 |
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) } |