2

I'm looking to achieve something like this:

enter image description here

Where the RecyclerView shows a list of endless repeating (Circular) items, but only shows 5 items at any given time. The endless scrolling part is done, but the sizing can't seem to work right. There is also the fact that the center item has to be larger, so I can't grab the width of the screen and make the item 1/5 of the screen.

Is it possible to achieve this on all screens?

A-Android UCG
  • 797
  • 1
  • 7
  • 23
  • you can make a custom layout of five elements or you can use gridLayout manager in recycler view with column count five and make middle element view like this – DeePanShu Jan 31 '19 at 11:26
  • if you want to make 1 item above all others check [this question](https://stackoverflow.com/questions/50760805/change-recyclerview-item-to-be-above-all-others) – Tamir Abutbul Jan 31 '19 at 11:35

1 Answers1

0

you can do this like :

 @Override
public int getItemCount() {
    return  5;
}

it works for me in the adapter class you can change items as you want to display

bugfreerammohan
  • 1,471
  • 1
  • 7
  • 22