As setLayoutFrozen is deprecated, You can disable scrolling by freezing your RecyclerView by using suppressLayout . Show activity on this post. You can disable scrolling by freezing your RecyclerView.
You can use Scroll listener to detect scroll up or down changes in RecyclerView . RecycleView invokes the onScrollStateChanged() method before onScrolled() method. The onScrollStateChanged() method provides you the RecycleView's status: SCROLL_STATE_IDLE : No scrolling.
LayoutManager implementations that lays out items in a grid. WearableLinearLayoutManager. This wear-specific implementation of LinearLayoutManager provides basic offsetting logic for updating child layout. A RecyclerView. LayoutManager implementation which provides similar functionality to ListView .
Add this to your layout:
android:overScrollMode="never"
So:
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:background="#FFFFFF"
android:scrollbars="vertical" />
And in Java you would do
recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER)
or in Kotlin
recyclerView.overScrollMode = View.OVER_SCROLL_NEVER
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With