florent37 / ExpansionPanel

Android - Expansion panels contain creation flows and allow lightweight editing of an element.
https://material.io/guidelines/components/expansion-panels.html
Apache License 2.0
1.98k stars 240 forks source link

ExpansionLayout is not resizing well #35

Closed quentin7b closed 6 years ago

quentin7b commented 6 years ago

I have 2 ExpansionPanels set vertically.

<ExpansionsViewGroupLinearLayout>

  <ExpansionHeader />
  <ExpansionLayout />

  <ExpansionHeader />
  <ExpansionLayout />

</ExpansionsViewGroupLinearLayout>

The ExpansionLayout height is bigger than the first.

I don't know if the behavior is linked to the ScrollView but after the first toggle the sizes of the ExpansionLayout are reduced even if the ExpansionLayout height is set to wrap_content

Is there something to do to force the ExpansionLayout to take the full height of all its chidren ?

quentin7b commented 6 years ago

Oops.

It looks like it was because I was setting a padding in the ExpansionLayout instead of the first child, which was a LinearLayout. I think it was not matching well with the fact that ExpansionLayout is a NesteedScrollView.

Anyway I can close the issue but I think it would be great to mention it in the README ?