1 min read

Feature module

The product list feature module includes all the presentation logic required to display the product list, sort and filter screens. If you need to include this module, add it to your build.gradle:

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

Architecture

Product list general architecture
Product list general architecture

  • ProductListActivity is the entry point to the product list SDK.
  • ProductListFragment is the main fragment for the product list screen.
  • ProductListView is the main view for the product list screen.
  • ProductListViewModel is responsible for coordinating the different screens inside the product list SDK and interacting with the use cases.
  • FilterFragment is the main fragment for the filters screen.
  • FiltersView is the main view for the filters screen.
  • FiltersViewModel is responsible for the communication with ProductListViewModel and presenting the filters.
  • PoqUiFilterPriceViewHolder is the view holder for the price filter.
  • FilterPriceViewModel is the view model for the price filter.
  • PoqUiFilterToggleViewHolder is the view holder for the toggle filter.
  • FilterToggleViewModel is the view model for the toggle filter.
  • PoqUiFilterMultiSelectionViewHolder is the view holder for the multi selection filter.
  • FilterMultiSelectionViewModel is the view model for the multi selection filter.
  • PoqUiFilterMultiSelectionItemViewHolder is the view holder for each chip inside the multi selection filter.
  • FilterMultiSelectionItemViewModel is the view model for each chip inside the multi selection filter.
  • FiltersStore is responsible for generating a new filter list based on the actions received from the different filters ViewModels.
  • FiltersMultiSelectionDetailFragment is the main fragment for the details of the multi selection filter, where the user selects the filter.
  • FiltersMultiSelectionDetailView is the main view for the details of the multi selection filter.
  • FiltersMultiSelectionDetailViewModel is responsible for coordinating all the screen and communicating with the main filter screen through FiltersStore
  • PoqUiFilterMultiSelectionItemDetailViewHolder is the view holder for each item inside the FiltersMultiSelectionDetailView.
  • PoqUiFilterMultiSelectionItemDetailViewModel is the view model for each item inside the FiltersMultiSelectionDetailView.
  • FiltersMultiSelectionStore is responsible for generating a new multi selection filter list based on the actions received from PoqUiFilterMultiSelectionItemDetailViewModel.

Views breakdown

The Product list screens are broken down into different views:

The Views in the Product list screens
The Views in the Product list screens

ViewXMLAlias
ProductListActivityactivity_productlist.xml-
ProductListFragmentfragment_product_list.xml-
ProductListViewproduct_list_view.xmlproductListViewLayout
ShimmerProductListViewplace_holder_product_list.xmlshimmerProductListLayout
ShimmerProductListItemViewplace_holder_product_list_item.xmlshimmerProductListItemLayout
BaseUIListingViewHolderitem_listing.xmlitemListingLayout
BaseLoadingViewHolderitem_loading.xmlitemLoadingLayout
BaseErrorViewHolderitem_error.xmlitemErrorLayout
FiltersFragmentfragment_filters.xml-
FiltersViewfilters_view.xmlfiltersViewLayout
BaseUiFilterPriceViewHolderitem_filter_price.xmlitemPriceLayout
BaseUiFilterToggleViewHolderitem_filter_toggle.xmlitemToggleLayout
BaseUiFilterMultiSelectionViewHolderitem_filter_multi_selection.xmlitemMultiSelectionLayout
BaseUiFilterCustomViewHolderitem_filter_custom.xmlitemCustomLayout
BaseUiMultiSelectionItemViewHolderitem_filter_multi_selection_item.xmlitemMultiSelectionItemLayout
FiltersMultiSelectionDetailFragmentfragment_filters_multi_selection_detail.xml-
FiltersMultiSelectionDetailViewfilters_multi_selection_detail_view.xmlfiltersMultiSelectionDetailViewLayout
BaseUiMultiSelectionItemDetailViewHolderitem_filter_multi_selection_item_detail.xmlitemMultiSelectionItemDetailLayout

Styles breakdown

The recommended way of styling Product lists screens 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 Product lists screens are shown in the image below:

Style elements in the Product list screens
Style elements in the Product list screens