Google Play Store Like Interface Using Recycler View
Solution 1:
Dont use nested listviews (you cant scroll horizontally in play store).
Consider the following options:
- You can use a simple LinearLayoutManager and make different view types. For the with 3 cards horizontally use a
GridLayout
orLinearLayout
with same weights. The problem here is, that you have to consider the indexes of your underlying data list used in the adapter - Write your own LayoutManager for RecyclerView
- Use TwoWay View which is based on RecyclerView and offers a
Spannable Grid
Layout manager, which seems to be what you are looking for.
Solution 2:
If you inspect the layout of the Google Play app, they do not use a listview/recyclerview for the horizontal cards. I'm pretty sure that is just a linearlayout (horizontal) within a vertical listview / recyclerview.
If you insist on using a horizontal recyclerview for each row, then having a nested recyclerview would be your best option. You can specify a RecycledViewPool
so that all the nested recyclerviews share the same pool instead of creating their own.
Solution 3:
You may like to do it as one vertical RecyclerView
(Main recycler) and for every section you can inflate a horizontal RecyclerView
as well (Section recycler) as this blog answer mention:
Also, consider using:
- A cache layer for
Bitmaps
for persistent access through your other store screens - A lazy load method for your category/section images
- A place holder before showing new items
Post a Comment for "Google Play Store Like Interface Using Recycler View"