File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
app/src/main/java/com/hoc/pagination_mvi/ui/main Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.hoc.pagination_mvi.ui.main
33import android.graphics.Rect
44import android.os.Bundle
55import android.view.LayoutInflater
6+ import android.view.MotionEvent
67import android.view.View
78import android.view.ViewGroup
89import androidx.fragment.app.Fragment
@@ -108,6 +109,17 @@ class MainFragment : Fragment() {
108109 }
109110 }
110111 })
112+
113+ addOnItemTouchListener(object : RecyclerView .SimpleOnItemTouchListener () {
114+ override fun onInterceptTouchEvent (rv : RecyclerView , e : MotionEvent ): Boolean {
115+ if (e.action == MotionEvent .ACTION_DOWN &&
116+ rv.scrollState == RecyclerView .SCROLL_STATE_SETTLING
117+ ) {
118+ rv.stopScroll()
119+ }
120+ return false
121+ }
122+ })
111123 }
112124 }
113125
You can’t perform that action at this time.
0 commit comments