Skip to content Skip to sidebar Skip to footer

Scrolling Recyclerview From The Middle Item

I am developing app for Android TV and I have a vertical RecyclerView, when I scroll the RecyclerView using the DPAD control the RecyclerView scroll down when I get to the last vie

Solution 1:

You can use SnapHelper which can snap the item either vertically or horizontally. For example: attach the instance the the recyclerView like this:

LinearSnapHelper snapHelper  = new LinearSnapHelper();
snapHelper.attachToRecyclerView(recyclerView);

Here is more information:

https://blog.mindorks.com/using-snaphelper-in-recyclerview-fc616b6833e8


Solution 2:

Was fixed using a VerticalGridView

https://corochann.com/verticalgridfragment-android-tv-application-hands-on-tutorial-19-718.html


Post a Comment for "Scrolling Recyclerview From The Middle Item"