From ef8ec5d159ad799cf1e1c74e3345ffbdfa2c9876 Mon Sep 17 00:00:00 2001 From: machiav3lli Date: Fri, 4 Mar 2022 02:24:42 +0100 Subject: [PATCH] Fix: Messed up chip icons tint --- .../com/looker/droidify/ui/fragments/ExploreFragment.kt | 4 ++-- src/main/res/values/attrs.xml | 4 ++++ src/main/res/values/styles.xml | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 src/main/res/values/attrs.xml diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt index 7a792eac..90f6ea28 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt @@ -68,12 +68,12 @@ class ExploreFragment : MainNavFragmentX() { viewModel.categories.observe(viewLifecycleOwner) { binding.categories.apply { removeAllViews() - addView(Chip(requireContext(), null, R.attr.chipStyle).apply { + addView(Chip(requireContext(), null, R.attr.categoryChipStyle).apply { setText(R.string.all_applications) id = R.id.SHOW_ALL }) it.forEach { - addView(Chip(requireContext(), null, R.attr.chipStyle).apply { + addView(Chip(requireContext(), null, R.attr.categoryChipStyle).apply { text = it }) } diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml new file mode 100644 index 00000000..ee15f3a5 --- /dev/null +++ b/src/main/res/values/attrs.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml index 6c878d88..20bb6496 100644 --- a/src/main/res/values/styles.xml +++ b/src/main/res/values/styles.xml @@ -31,7 +31,7 @@ @color/md_theme_light_surface @android:color/transparent true - @style/Theme.Chip.Category + @style/Theme.Chip.Category @style/Theme.Tab @style/Theme.Switch @@ -70,7 +70,7 @@ @color/md_theme_dark_primaryInverse @color/grey_dark @android:color/transparent - @style/Theme.Chip.Category + @style/Theme.Chip.Category @style/Theme.Tab @style/Theme.Switch @@ -109,7 +109,7 @@ @color/md_theme_dark_onBackground @color/md_theme_dark_surface @android:color/transparent - @style/Theme.Chip.Category + @style/Theme.Chip.Category @style/Theme.Tab @style/Theme.Switch @@ -143,7 +143,7 @@ ?attr/colorSurface -