I am using FocusLayoutManager for RecyclerView. Everything is fine but I need to swipe only one item at a time. I have also tried LinearSnapHelper and others too, i.e. SnapHelperOneByOne but didn't helped. Also tried to modify the focus layout manager class itself but all in vain. Any help would be appreciated.
Link for FocusLayoutManager
Link for SnapHelperOneByOne
Link for FocusLayoutManagerLibrary
Note: I have tried to attach the SnapHelper to RecyclerView after layout manager is assigned.
val focusLayoutManager = FocusLayoutManager.Builder()
.focusOrientation(FocusLayoutManager.FOCUS_TOP)
.isAutoSelect(true)
.maxLayerCount(1)
.setOnFocusChangeListener { focusdPosition, lastFocusdPosition -> }
.build()
myRecycler.layoutManager = focusLayoutManager
Using Snap Helper doesn't help also and makes the scrolling lagging (jerks)
val mySnapHelper = SnapHelperOneByOne()
mySnapHelper.attachToRecyclerView(myRecycler)