Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- specialDiscountsCategoriesList.layoutManager = LinearLayoutManager(activity, LinearLayoutManager.HORIZONTAL, false)
- specialDiscountsCategoriesList.isNestedScrollingEnabled = false
- specialDiscountsCategoriesList.setHasFixedSize(false)
- specialDiscountsCategoriesList.addOnItemTouchListener(object : RecyclerView.OnItemTouchListener {
- override fun onTouchEvent(rv: RecyclerView?, e: MotionEvent?) {
- }
- override fun onInterceptTouchEvent(rv: RecyclerView?, e: MotionEvent?): Boolean {
- when (e?.action) {
- MotionEvent.ACTION_UP, MotionEvent.ACTION_DOWN -> {
- specialDiscountsCategoriesList.requestDisallowInterceptTouchEvent(false)
- return true
- }
- }
- return false
- }
- override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement