Closed recoverrelax closed 8 years ago
I don't really have a working example to share of a such a behavior. The biggest difficulty you will likely encounter is simply that all the views in your layout won't be scrolling at the same rate, so convenience methods like offsetChildrenHorizontal()
or offsetChildrenVertical()
won't be useful since they move all views the same distance. You will end up calling offsetTopAndBottom()
and offsetLeftAndRight()
individually for each view.
Beyond that, it's likely just modifying the layout logic to track which view is currently at the top of the stack, so all other views underneath can be recycled. Top view only moves if its neighbor is not overlapping it.
Hey, Im sorry to bother you here :P First let me thank you about this demo app, its actually the only one that truly explain how to build a layoutmanager. I have a requirement in my app in which i have to develop a scrolling behavior in which the first card stays fixed in the layout, and the other cards will overlap the first card and disappear after.
It is like a stack of cards, except only the first card will stack. I find it hard to manage the different card overlapp offsets, and i'm strugling really hard with it.
Do you have any sample demo in which such behavior (or kind of) is present? Or can you give me any tips about how to accomplish such a thing.
thanks in advanced, John