Skip to content

Instantly share code, notes, and snippets.

@abhishekBansal
Created August 19, 2021 16:54
Show Gist options
  • Save abhishekBansal/b76072c95dd57751bb57278355f7f517 to your computer and use it in GitHub Desktop.
Save abhishekBansal/b76072c95dd57751bb57278355f7f517 to your computer and use it in GitHub Desktop.
// apply touch listener on ViewPager RecyclerView
val recyclerView = binding.viewPager[0] as? RecyclerView
if (recyclerView != null) {
recyclerView.addOnItemTouchListener(swipeControlTouchListener)
} else {
Log.w(localClassName, "RecyclerView is null, API/Version changed ?!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment