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 f6f55883..34433b24 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt @@ -52,35 +52,6 @@ class ExploreFragment : MainNavFragmentX() { redrawPage(it) } viewModel.categories.observe(viewLifecycleOwner) { - binding.categories.apply { - removeAllViews() - addView(Chip(requireContext(), null, R.attr.categoryChipStyle).apply { - setText(R.string.all_applications) - id = R.id.SHOW_ALL - }) - it.sorted().forEach { - addView(Chip(requireContext(), null, R.attr.categoryChipStyle).apply { - text = it - }) - } - val selectedSection = viewModel.sections.value - check( - children.filterNotNull() - .find { child -> - child is Chip && selectedSection is Category && child.text == selectedSection.label - }?.id ?: R.id.SHOW_ALL - ) - } - } - binding.categories.setOnCheckedStateChangeListener { group, checkedIds -> - group.findViewById(checkedIds[0]).let { - viewModel.setSection( - if (it.text.equals(getString(R.string.all_applications))) - Section.All - else - Section.Category(it.text.toString()) - ) - } } mainActivityX.menuSetup.observe(viewLifecycleOwner) { if (it != null) { diff --git a/src/main/res/layout/fragment_explore_x.xml b/src/main/res/layout/fragment_explore_x.xml index c081e301..476406bb 100644 --- a/src/main/res/layout/fragment_explore_x.xml +++ b/src/main/res/layout/fragment_explore_x.xml @@ -15,8 +15,7 @@ ~ You should have received a copy of the GNU Affero General Public License ~ along with this program. If not, see . --> - + @@ -26,33 +25,10 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - - - - - - + android:layout_height="match_parent" />