Add: Categories chips & bar

This commit is contained in:
machiav3lli
2022-02-18 02:53:01 +01:00
parent d31dd0c675
commit d4fa141962
4 changed files with 43 additions and 1 deletions

View File

@ -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
})
}
}
}
}