aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-27 11:37:45 -0700
committerAllan Wang <me@allanwang.ca>2017-06-27 11:37:45 -0700
commit8179e50208192e2b18b4df3bfc100d9cf779891a (patch)
tree96e59c13660b9f17d5a95bd506746497cdc5dff1
parent7871b27bcc5cffcc5bc6ca380d7ad4456cb40eda (diff)
downloadkau-8179e50208192e2b18b4df3bfc100d9cf779891a.tar.gz
kau-8179e50208192e2b18b4df3bfc100d9cf779891a.tar.bz2
kau-8179e50208192e2b18b4df3bfc100d9cf779891a.zip
Exclude stdlib in rxbinding
-rw-r--r--library/build.gradle12
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/views/TextSlider.kt15
2 files changed, 22 insertions, 5 deletions
diff --git a/library/build.gradle b/library/build.gradle
index c6a4904..abb7bc1 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -63,14 +63,16 @@ dependencies {
compile "com.jakewharton.timber:timber:${TIMBER}"
- compile ("org.jetbrains.anko:anko-commons:${ANKO}") {
- exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
- }
+ compile "org.jetbrains.anko:anko-commons:${ANKO}"
compile "io.reactivex.rxjava2:rxkotlin:${RX_JAVA}"
compile "io.reactivex.rxjava2:rxandroid:${RX_ANDROID}"
- compile "com.jakewharton.rxbinding2:rxbinding-kotlin:${RX_BINDING}"
- compile "com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:${RX_BINDING}"
+ compile ("com.jakewharton.rxbinding2:rxbinding-kotlin:${RX_BINDING}") {
+ exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
+ }
+ compile ("com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:${RX_BINDING}") {
+ exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
+ }
compile("com.mikepenz:aboutlibraries:${ABOUT_LIBRARIES}@aar") {
transitive = true
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) }