From f58813c380211fdf457fbb1a04ecc60909ebfad9 Mon Sep 17 00:00:00 2001 From: Evgeny Razumov Date: Mon, 7 May 2018 01:26:37 +0300 Subject: [PATCH] unckecked text color attr --- demo/src/main/res/layout/fragment_sample.xml | 3 ++- .../hoang8f/android/segmented/SegmentedGroup.java | 14 +++++++++++++- library/src/main/res/values/attrs.xml | 1 + library/src/main/res/values/colors.xml | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/demo/src/main/res/layout/fragment_sample.xml b/demo/src/main/res/layout/fragment_sample.xml index 25ce8a5..49336e5 100644 --- a/demo/src/main/res/layout/fragment_sample.xml +++ b/demo/src/main/res/layout/fragment_sample.xml @@ -28,7 +28,8 @@ segmentedgroup:sc_corner_radius="10dp" segmentedgroup:sc_tint_color="#FFEB3B" segmentedgroup:sc_unchecked_tint_color="#ff0000" - segmentedgroup:sc_checked_text_color="#7C4DFF"> + segmentedgroup:sc_checked_text_color="#7C4DFF" + segmentedgroup:sc_unchecked_text_color="#000000"> (); int count = super.getChildCount(); @@ -140,7 +152,7 @@ private void updateBackground(View view) { ColorStateList colorStateList = new ColorStateList(new int[][]{ {-android.R.attr.state_checked}, {android.R.attr.state_checked}}, - new int[]{mTintColor, mCheckedTextColor}); + new int[]{mUnCheckedTextColor, mCheckedTextColor}); ((Button) view).setTextColor(colorStateList); //Redraw with tint color diff --git a/library/src/main/res/values/attrs.xml b/library/src/main/res/values/attrs.xml index 2c17aba..34f3b34 100644 --- a/library/src/main/res/values/attrs.xml +++ b/library/src/main/res/values/attrs.xml @@ -6,6 +6,7 @@ + diff --git a/library/src/main/res/values/colors.xml b/library/src/main/res/values/colors.xml index 737f955..7601836 100644 --- a/library/src/main/res/values/colors.xml +++ b/library/src/main/res/values/colors.xml @@ -2,4 +2,5 @@ #ff33b5e5 #e0e0e0 + #ff33b5e5 \ No newline at end of file