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 5d7dc346..67b59b85 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt @@ -63,5 +63,16 @@ class ExploreFragment : MainNavFragmentX() { } } } + viewModel.categories.observe(viewLifecycleOwner) { + binding.categories.removeAllViews() + binding.categories.addView(Chip(requireContext(), null, R.attr.chipStyle).apply { + setText(R.string.all_applications) + }) + it.forEach { + binding.categories.addView(Chip(requireContext(), null, R.attr.chipStyle).apply { + text = it + }) + } + } } } diff --git a/src/main/res/color/selector_chip_background.xml b/src/main/res/color/selector_chip_background.xml new file mode 100644 index 00000000..5cd25b7e --- /dev/null +++ b/src/main/res/color/selector_chip_background.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/res/layout/fragment_explore_x.xml b/src/main/res/layout/fragment_explore_x.xml index cf930f3f..aece8b86 100644 --- a/src/main/res/layout/fragment_explore_x.xml +++ b/src/main/res/layout/fragment_explore_x.xml @@ -15,7 +15,8 @@ ~ You should have received a copy of the GNU Affero General Public License ~ along with this program. If not, see . --> - + @@ -31,6 +32,21 @@ android:nestedScrollingEnabled="true" android:orientation="vertical"> + + + + + @color/md_theme_light_surface @android:color/transparent true + @style/Theme.Chip.Category @style/Theme.Tab @style/Theme.Switch @@ -69,6 +70,7 @@ @color/md_theme_dark_primaryInverse @color/grey_dark @android:color/transparent + @style/Theme.Chip.Category @style/Theme.Tab @style/Theme.Switch @@ -107,6 +109,7 @@ @color/md_theme_dark_onBackground @color/md_theme_dark_surface @android:color/transparent + @style/Theme.Chip.Category @style/Theme.Tab @style/Theme.Switch @@ -140,6 +143,13 @@ ?attr/colorSurface + +