I'm trying to create an HorizontalScrollView
with a RecyclerView
, I have my adapter with FirebaseAdapter
with my onCreateViewHolder
, onDataChanged
and its onBindViewHolder
, what I'd like to add on my RecyclerView
is something like this Image, something like, user only will see 3 items, and the centered zoomed/bigger, someone told me that I have to override getItemViewType
, but I do not know how to, could you guide to how to do it?
To make it act like an HorizontalScrollView
I've added a CustomLinearLayout
like this :
LinearLayoutManager layoutManager =
new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
rv.setLayoutManager(layoutManager);
What I'd like it to show is like this (each blank rectangle is an item) :
I allready have a RecyclerView
which acts like HorizontalScrollView
BUT I'm not able to make that customizable, to show it like the image from above.
Actually this is a popular thing to implement, so the solution already exists on GitHub - https://github.com/yarolegovich/DiscreteScrollView. It's highly customizable, so you can adjust it for your needs and metrics. Here is an example from that lib:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With