cachapa / ExpandableLayout

An expandable layout container for Android
Apache License 2.0
2.34k stars 273 forks source link

Request: Linear layout as root. #83

Closed armata99 closed 4 years ago

armata99 commented 4 years ago

I think it would be better if your view extends Linear layout instead of a frame layout, since it has to do expanding and collapsing in both horizontal and vertical orientations.

cachapa commented 4 years ago

Better how?

armata99 commented 4 years ago

As you know a linear layout puts its children in a row/column and obviously takes more space on the screen so it makes more sense when such layout gets collapsed/expanded rather than a frame layout which stacks the children. And of course in cases like me it makes layout lighter because I had to add a direct linear layout child to get my job done.

If it's possible and you intend to do this, it's a good idea to add it as a side option within the original one.

cachapa commented 4 years ago

The purpose of ExpandableLayout is to expand and collapse a single view. It has nothing to do with laying multiple views horizontally or vertically.

The intended way to use this library is by wrapping the view you want to expand or collapse and dropping it inside another layout. Please look at the supplied examples.