Platform module

The home presentation implementation is located inside the platform module, and most of the implementation is located under the main package.

Architecture

Home general architecture
Home general architecture

  • BottomNavigationActivity is responsible for initializing BottomNavigationFragments, HomeFragment being one of them.
  • HomeFragment is the main fragment for the Home screen.
  • HomeViewBinder legacy code with the purpose of gluing all of the necessary view components and the view models together.
  • BaseBannerRecyclerView is responsible for rendering multiple Banner types.
  • BaseUiBannerImageViewHolder is the view holder for the image/gif banners.
  • BannerImageViewModel is the view model for the image/gif banners.
  • BaseUiBannerProductCarouselViewHolder is the view holder for the url product carousel.
  • BaseUiBannerRecentlyViewedViewHolder is the view holder for the recently viewed carousel
  • BaseUiBannerVideoViewHolder is the view holder for video view.
  • PoqVideoViewModel is the view model for video banner which is responsible for setting the appropriate data and handling the onClick logic.
  • BaseUiStoriesCarouselViewHolder is the view holder for the stories Carousel View.
  • StoriesCarouselViewModel is the view model for the stories carousel view which is responsible for handling the visibility/error/display and saving the current position logic.
  • BaseUIBannerCustomViewHolder is an empty view holder which you can override and provide as many banner view holders as custom Banner types to support additional functionality.

Views breakdown

Some of the Views in the Home screen
Some of the Views in the Home screen

Rest of the Views in the Home screen
Rest of the Views in the Home screen

ViewXMLAlias
HomeFragment/HomeViewBinderfragment_home.xmlhomeFragmentLayout
BaseUiBannerImageViewHolderimage_banner_item_view.xmlbannerImageItemLayout
BaseUiBannerProductCarouselViewHolderproduct_carousel_banner_item_view.xmlbannerProductCarouselItemLayout
BaseUiBannerRecentlyViewedViewHolderrecently_viewed_banner_item_view.xmlbannerRecentlyViewedItemLayout
BaseUiBannerVideoViewHoldervideo_banner_item_view.xmlbannerVideoItemLayout
BaseUiStoriesCarouselViewHolderstories_carousel_banner_item_view.xmlbannerStoriesCarouselItemLayout
BaseUIBannerCustomViewHoldercustom_banner_item_view.xmlbannerCustomItemLayout