Search code examples
androidandroid-layoutandroid-fragmentsandroid-scrollviewandroid-controls

Which control to use to make a Google Play style horizontal scroll


I am trying to make a horizontal scrolling list much like one we can find in the Google Play app. I have made the fragment (100dp x 150dp), and the adapter, but am struggling to find an element that will work.

The fragment looks like this :

enter image description here

It is just a cardview with a imageview, and a couple textviews within.

My goal is to make many of them together, horizontally, and scrollable like this:

enter image description here

I tried using a ViewPager, but that only allows for one full screen element, but I need a list that continues off the page. A HorizontalScrollView on the other hand would not "snap" to an element as seen in the gif above.

Any suggestions on which element would suite this the best?


Solution

  • I'd suggest using the RecyclerView "pattern" and simply use a LinearLayoutManager with its orientation set to HORIZONTAL.