aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-21 23:26:50 -0700
committerAllan Wang <me@allanwang.ca>2017-06-21 23:26:50 -0700
commitc39611eb051edff769d5dd3bc9ffa6f1580bb96b (patch)
tree0d669bf951794d1645cea77b79ec6c8fe78a3106 /library
parentad9bf4849b3274a26dfa8e6032375e5cd982f064 (diff)
downloadkau-c39611eb051edff769d5dd3bc9ffa6f1580bb96b.tar.gz
kau-c39611eb051edff769d5dd3bc9ffa6f1580bb96b.tar.bz2
kau-c39611eb051edff769d5dd3bc9ffa6f1580bb96b.zip
Fix up textswitcher
Diffstat (limited to 'library')
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/views/TextSwitcherThemed.kt9
1 files changed, 4 insertions, 5 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/views/TextSwitcherThemed.kt b/library/src/main/kotlin/ca/allanwang/kau/views/TextSwitcherThemed.kt
index bdc529c..c4de808 100644
--- a/library/src/main/kotlin/ca/allanwang/kau/views/TextSwitcherThemed.kt
+++ b/library/src/main/kotlin/ca/allanwang/kau/views/TextSwitcherThemed.kt
@@ -1,6 +1,7 @@
package ca.allanwang.kau.views
import android.content.Context
+import android.graphics.Color
import android.util.AttributeSet
import android.widget.TextSwitcher
import android.widget.TextView
@@ -11,13 +12,11 @@ import android.widget.TextView
class TextSwitcherThemed @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null
) : TextSwitcher(context, attrs) {
- var textColor: Int = -1
+ var textColor: Int = Color.WHITE
get() = field
set(value) {
field = value
- if (value != -1) {
- (getChildAt(0) as TextView).setTextColor(value)
- (getChildAt(1) as TextView).setTextColor(value)
- }
+ (getChildAt(0) as TextView).setTextColor(value)
+ (getChildAt(1) as TextView).setTextColor(value)
}
} \ No newline at end of file