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:

Swipe to like screen
Swipe to like screen

Start using Swipe to like SDK

To start using it, you need to:

  1. Add the feature module to your build.gradle
    implementation ("com.poqstudio:catalogue.swipetolike:$VERSION_NAME")
  2. Open the screen using SwipeToLikeActivity or PoqSwipeToLikeFragment. Swipe to like screen accepts any SearchType as a parameter, you can use SwipeToLikeActivity.getStartIntent to get the appropriate Intent or poqSwipeToLikeFragment.setArgs to set the SearchType on the fragment.

If you want to include Swipe to like on the main screen as a new bottom tab, you need to:

  1. Override BottomNavigationItemFactory and create the appropriate BottomNavigationItem:
    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
    )
    }
    }
  2. Override BottomNavigationFragmentFactory and create the fragment setting the SearchType:
    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