yuyakaido / CardStackView

📱Tinder like swipeable card view for Android
Apache License 2.0
2.37k stars 448 forks source link

How to set width and height to a particular size? #240

Closed vadhmln closed 5 years ago

vadhmln commented 5 years ago

Hi. guys! I want to to set width and height to a particular size, like: 200dp; 250dp. But when I set it in my item_spot layout and leave width and height to match_parent in cardstackview, nothing happing - The width and height are always set to match_parent. And when I set width and height in cardstackview to a particular size, like: 200dp; 250dp, the cards swiping inside this area (200dp; 250dp).

So, is it a bug or I do something wrong?
Thanks for your awesome project!

yuyakaido commented 5 years ago

@vadhmln The correct way is that cardstackview has a particular size like width:200dp and height:250dp.And you should set clipChildren=false to parent of cardstackview.

yuyakaido commented 5 years ago

@vadhmln You can get more information from sample app.