From c39611eb051edff769d5dd3bc9ffa6f1580bb96b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 21 Jun 2017 23:26:50 -0700 Subject: Fix up textswitcher --- .../src/main/kotlin/ca/allanwang/kau/views/TextSwitcherThemed.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'library/src/main/kotlin/ca/allanwang') 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 -- cgit v1.2.3