markolazic88 / SwipeCardView

MIT License
173 stars 38 forks source link

SwipeCardView occupies entire vertical area in layout #21

Closed Tommigun1980 closed 4 years ago

Tommigun1980 commented 4 years ago

Hi!

I noticed that no matter how I set the SwipeCardView up, it fills the entire area where it resides. So if I have it in a StackLayout, the SwipeCardView will the entire vertical space with FillAndExpand. If using anything else than FillAndExpand, the contents won't be shown.

I suspect this has to do with the relative layout that resides at root level inside the SwipeCardView. The reason I'd want the SwipeCardView to only fill the space of its children is;

1) I'd like to have a sibling to the SwipeCardView that's a spinner and a dimming element. Because the SwipeCardView will eat up the entire vertical area the spinner won't be centered to the cards but rather to the parent view. 2) The SwipeCardView is draggable/swipable anywhere in the main view, not just where its contents are.

If I replace the SwipeCardView with any other component the problem goes away, so it is definitely something it is doing internally. If there is a workaround or I've just missed something please advice!

Thank you.