Skip to content

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

Open

Description

@4gus71n

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! 🙇

Activity

  1. gsrathoreniks commented on Nov 26, 2021

    @gsrathoreniks

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions