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
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 initialisesCategoriesRecyclerViewAdapter
with the information received fromCategoriesViewModel
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:
View | XML | Alias |
---|---|---|
CategoriesActivity | activity_categories.xml | - |
CategoriesFragment | categories_fragment.xml | - |
CategoriesView | categories_view.xml | categoriesViewLayout |
ShimmerCategoriesView | place_holder_categories.xml | shimmerCategoriesLayout |
BaseUiCategoryViewHolder | item_category_list.xml | itemCategoryListLayout |
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: