Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to obscure or add an overlay on top of the stack cards? #355

Open
4gus71n opened this issue Nov 15, 2021 · 1 comment
Open

How to obscure or add an overlay on top of the stack cards? #355

4gus71n opened this issue Nov 15, 2021 · 1 comment

Comments

@4gus71n
Copy link

4gus71n commented Nov 15, 2021

First of all, amazing library! 🚀 The API is super straightforward and the whole library is a pleasure to work with. I'm actually using this library to implement some modals and it has really simplified a lot of things for me. Thanks! 🙇

Question

Is there any hook function or any callback I could use to obscure the stack cards that we have behind the main card 👇
image

What I want is to display some sort of black overlay on top of those stack cards, and have it fade away as we dismiss the current card.

I was thinking about using the onCardDragging(direction: Direction?, ratio: Float) callback but I don't have any reference to the view.

Again, thanks for this library it truly saved me from some headaches! 🙇

@gsrathoreniks
Copy link

Hey @4gus71n

You can get the reference of the view by using:-

manager?.findViewByPosition(topViewPosition-1)

Where :-

  • manager - CardStackLayoutManager
  • topViewPosition - Position of the top view
    • manager?.topPosition

Let me know if this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants