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

[FEATURE REQUEST] Make it possible to have both cards share height of the higher one #51

Open
GiorgioKozmani opened this issue Dec 7, 2020 · 1 comment

Comments

@GiorgioKozmani
Copy link

First of all - Thank you for providing us with such a great and simple library! I love it and I'm generally delighted with how it works, but there's a problem that I see no simple way of fixing.

Currently, I see no other way for cards to have them share the height of the higher one other than hardcode height of both child fragments. I think that allowing the control of whether I want the other side visibility to be changed to INVISIBLE not GONE would help many people that want to display dynamic content in their FlipView.

@GiorgioKozmani
Copy link
Author

I just thought that it might be worth to share my workaround. Both sides of FlipCard are fragments that are held in a simple ViewGroup that extends FrameLayout and has this little hack in it.

override fun onVisibilityChanged(changedView: View, visibility: Int) {
    super.onVisibilityChanged(changedView, visibility)

    if (changedView == this && visibility == GONE) {
        setVisibility(INVISIBLE)
    }
}

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

1 participant