Feature module

The categories feature module includes all the presentation logic required to display the categories screen. If you need to include this module, add it to your build.gradle:

implementation ("com.poqstudio:catalogue.categoriesv2:$VERSION_NAME")

Architecture

Categories general architecture
Categories general architecture

  • CategoriesActivity is the entry point to the Categories screen.
  • CategoriesFragment is the fragment used in the bottom bar navigation.
  • CategoriesView controls the visibility of the elements in the screen. It also initialises CategoriesRecyclerViewAdapter with the information received from CategoriesViewModel and handles the navigation of the screen.
  • CategoriesViewModel is the main ViewModel.
  • CategoryItemViewModel is the ViewModel for each category row.
  • CategoriesStore handles the categories expansion/collapse.
  • ProgressiveCategoriesActivity is the entry point to the Progressive Categories screen.
  • ProgressiveCategoriesFragment is the main fragment for the Progressive Categories screen.
  • ProgressiveCategoriesFragmentDelegate is the fragment delegate for the Progressive Categories screen.
  • ProgressiveCategoriesViewModel is the ViewModel used by Progressive Categories.

Views breakdown

The Categories screen is broken down into different views:

The Views in the Categories screen
The Views in the Categories screen

ViewXMLAlias
CategoriesActivityactivity_categories.xml-
CategoriesFragmentcategories_fragment.xml-
CategoriesViewcategories_view.xmlcategoriesViewLayout
ShimmerCategoriesViewplace_holder_categories.xmlshimmerCategoriesLayout
BaseUiCategoryViewHolderitem_category_list.xmlitemCategoryListLayout

Styles breakdown

The recommended way of styling Categories screen is by using App Styling. If you need more granular customisation, you can override the specific style and provide your own. The styles for the Categories screen are shown in the image below:

Style elements in the Categories screen
Style elements in the Categories screen