1

I want my RecyclerView items align to screen borders,
android:layout_width="match_parent" isn't working and it's giving me this result:

enter image description here

While this is what I'm trying to achieve:

enter image description here

Any help would be appreciated.

Mr. Thanks a lot
  • 235
  • 4
  • 17

1 Answers1

0

recyclerView.setLayoutManager(new GridLayoutManager(this, numberOfColumns)); Here, numberOfColumns value would be 2 is you want to show to items at once, equally spaced, in a grid manner.

touhid udoy
  • 4,005
  • 2
  • 18
  • 31