D
D
DARKENN2019-10-26 19:17:59
Java
DARKENN, 2019-10-26 19:17:59

How to make recycler view slider?

5db471aa0ca14764110257.jpeg
Approximately as in the picture

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
terminator-light, 2019-10-26
@DARKENN

there are 2 options here: either use RecyclerView and attach PagerSnapHelper to it,
or ViewPager2

layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false);
    recyclerView.setLayoutManager(layoutManager);
    PagerSnapHelper snapHelper = new PagerSnapHelper();
    snapHelper.attachToRecyclerView(recyclerView);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question