Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. specialDiscountsCategoriesList.layoutManager = LinearLayoutManager(activity, LinearLayoutManager.HORIZONTAL, false)
  2. specialDiscountsCategoriesList.isNestedScrollingEnabled = false
  3. specialDiscountsCategoriesList.setHasFixedSize(false)
  4.  
  5. specialDiscountsCategoriesList.addOnItemTouchListener(object : RecyclerView.OnItemTouchListener {
  6. override fun onTouchEvent(rv: RecyclerView?, e: MotionEvent?) {
  7.  
  8. }
  9.  
  10. override fun onInterceptTouchEvent(rv: RecyclerView?, e: MotionEvent?): Boolean {
  11. when (e?.action) {
  12. MotionEvent.ACTION_UP, MotionEvent.ACTION_DOWN -> {
  13. specialDiscountsCategoriesList.requestDisallowInterceptTouchEvent(false)
  14. return true
  15. }
  16. }
  17.  
  18. return false
  19. }
  20.  
  21. override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement