The implementation will snap the center of the target child view to the center of the attached RecyclerView
val snapHelper = LinearSnapHelper()snapHelper.attachToRecyclerView(recylerView)
PagerSnapHelper can help achieve a similar behavior to ViewPager. Set both RecyclerView and the items of the RecyclerView.Adapter to have ViewGroup.LayoutParams.MATCH_PARENT height and width and then attach PagerSnapHelper to the RecyclerView using SnapHelper.attachToRecyclerView(RecyclerView).
val snapHelper = PagerSnapHelper()snapHelper.attachToRecyclerView(recylerView)