AleSpero / ExpandableCardView

Simple expandable CardView for Android.
Apache License 2.0
689 stars 88 forks source link

Inner View does not resize #34

Open stleusc opened 5 years ago

stleusc commented 5 years ago

Thanks for this great library. I have one issue though (and I think others too).

How to recreate the issue: add a button into the layout of your inner view. on click of the button and a label into the inflated inner view. repeat... you will see that the expanded card does NOT resize.

Not sure what the reason is though.

modul-23 commented 5 years ago

A little workaround for this issue is this codesnippet

ExpandableCardView ecv = findViewById(R.id.expandable_card_view);

if (ecv.isExpanded()) {
    ecv.collapse();
    ecv.expand();
}

So this card will be closed and reopened again. On reopen the dimension will be computed correct.