EasyFlipView icon indicating copy to clipboard operation
EasyFlipView copied to clipboard

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

Open GiorgioKozmani opened this issue 4 years ago • 1 comments

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 avatar Dec 07 '20 10:12 GiorgioKozmani

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)
    }
}

GiorgioKozmani avatar Dec 07 '20 11:12 GiorgioKozmani