Is there a way to show the items of a horizontal recyclerview aligned in center. i.e. the gravity of the list will be center_horizontal.
For example, to implement something like this:
Is there a way to show the items of a horizontal recyclerview aligned in center. i.e. the gravity of the list will be center_horizontal.
For example, to implement something like this:
You could to define your custom layout manager: Android Centering Item in RecyclerView
Or if you need to get discrete scrolling here's the lib: https://android-arsenal.com/details/1/5480
Or recyclerView could be wrap_content
with center aligment in parent frame:
How do I make WRAP_CONTENT work on a RecyclerView
Try this code:
SnapHelper helper = new LinearSnapHelper();
helper.attachToRecyclerView(recyclerView);