Swipe to like
The Swipe to like SDK is where your customers can see a stack of products to be added to their wishlist.
Without any customisation, Swipe to like screen looks like this:
Start using Swipe to like SDK
To start using it, you need to:
- Add the feature module to your
build.gradle
implementation ("com.poqstudio:catalogue.swipetolike:$VERSION_NAME") - Open the screen using
SwipeToLikeActivity
orPoqSwipeToLikeFragment
. Swipe to like screen accepts anySearchType
as a parameter, you can useSwipeToLikeActivity.getStartIntent
to get the appropriate Intent orpoqSwipeToLikeFragment.setArgs
to set theSearchType
on the fragment.
If you want to include Swipe to like on the main screen as a new bottom tab, you need to:
- Override
BottomNavigationItemFactory
and create the appropriateBottomNavigationItem
:class CustomBottomNavigationItemFactory(decorator: BottomNavigationItemFactory) : BottomNavigationItemFactory by decorator {override fun createItemFive(): BottomNavigationItem {return BottomNavigationItem(R.string.title_swipe_to_like,R.drawable.ic_swipe_to_like)}} - Override
BottomNavigationFragmentFactory
and create the fragment setting theSearchType
:class CustomBottomNavigationFragmentFactory(decorator: BottomNavigationFragmentFactory) : BottomNavigationFragmentFactory by decorator {override fun createFragmentFive(): BottomNavigationFragment {return PoqSwipeToLikeFragment().apply {setArgs(SearchType.Keyword("example"))}}}
Swipe to like SDK is composed of these modules:
Koin modules
Swipe to like SDK dependencies are injected using Koin. Swipe to like SDK injects automatically all the necessary Koin modules when you include the feature module into your project. These are the Koin modules included:
swipeToLikeDataModule
swipeToLikeDomainModule
swipeToLikePresentationModule