-1

I'm trying to make a layout looking like that in the picture, but actually I have no idea to how make it.

I'd like to know if someone knows the commands to make the elevation changing with position in screen (max when is in the center), and how to have always 1 card in the center after scroll, even if I end to scroll between 2 cards.

image

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
teuuu
  • 1
  • 2
  • I think it's view pager, and it uses specific library, you can use [this](https://github.com/wasabeef/awesome-android-ui/blob/master/pages/ViewPager.md) – salmanseifian Jan 02 '18 at 14:10

1 Answers1

0

For positioning the items at the center in horizontal recyclerview while scrolling you can Snappy scrolling in recyclerview: Check the answers from this OR this question for more details.

Alternatively, try the code from here . This has the complete code regarding your case.

OR just save your time and use this library.

Imtiaz Abir
  • 731
  • 7
  • 12
  • i saw that in the point 2 thre is a solution but should work just for tv...i tried to put a toast message inside the onbinviewholder but never appear..any ideas – teuuu Jan 03 '18 at 13:10
  • Please check my updated answer. And regarding the Onbindviewholder toast issue, Onbindviewholder method is only for binding views, it will not show toast message. If you want to show toast message from recyclerview adapter then check this answer: https://stackoverflow.com/a/31792039/5590249. – Imtiaz Abir Jan 04 '18 at 04:54