skydoves / ExpandableLayout

🦚 An expandable layout that shows a two-level layout with an indicator.
Apache License 2.0
833 stars 54 forks source link

Second layout does not have the right height #5

Closed fgnm closed 3 years ago

fgnm commented 4 years ago

Please complete the following information:

I'm using this library inside a recyclerview. Each item in the recyclerview can be expanded, but the content of each item can vary, so the height is different for each item. The library seems to calculate the height for each item, however the height is not correct. For each item is always less the the real layout size.

Expected Behavior:

Since the content of each item is dynamic, the library should expose a method that can re mesure the height of the second layout.

pierrekhouryy commented 4 years ago

I seem to have this problem as well. Second layout if a horizontal scrollview and yet the more items are added to the scrollview the taller the second layout gets. any fix ?

Imran-ss commented 4 years ago

I am also facing similar issue. Indeed I am able to reproduce in demo app as well, see the image. space_in_2nd_layout I added some random number of second child then expand and collapse few time all items, then extra space has been added in 2nd layout.

skydoves commented 4 years ago

Hi, I fixed the measuring function internally, it's released a new version 1.0.5. If you check working well in a new version, this issue will be closed. Thank you for your issue :)

Imran-ss commented 4 years ago

Thanks @skydoves the child space issue has fixed. but after this fix I observe first time render of parent view is very slow. seems like scroll issue as well. expand any bottom parent and then try to scroll up, you will notice scroll is not working properly.