0

I am designing an activity that should have a 2*2 grid.

There are other UI elements in the activity as well . The first half of the activity should take up this grid view.

This grid view has to be horizontally scrollable and on every scroll, activity should have a grid of 2*2.

I tried doing this using a recycler view and I set the layout of recycler view as follows

recyclerView.setLayoutManager(new GridLayoutManager(this,2,GridLayoutManager.HORIZONTAL,false));

With this the 2*2 grid spreads over two pages with two rows and not two columns

How can I get it to look like a grid of 2*2 that is horizontally scrollable?

I am new to android. Any help will be appreciated. Thank you

enter image description here

A.S
  • 798
  • 1
  • 10
  • 32
  • If you'd manage to have a visible two by two grid, but only two columns altogether, where do you want to scroll to horizontally? – kalabalik Jan 25 '18 at 12:20
  • When I swipe left or write I want to move to another view with the same grid but different contents. That is a grid of 2*@ should be visible when I scroll left or write but with different contents – A.S Jan 25 '18 at 12:24
  • Two `RecyclerView`s then? I think I don't understand. Can you provide a diagram? – kalabalik Jan 25 '18 at 12:28

0 Answers0