skydoves / ExpandableLayout

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

Redundant amount of children's in View Hierarchy #3

Closed MBratkowski closed 4 years ago

MBratkowski commented 4 years ago

Please complete the following information:

Describe the Bug: First thing - great job! I like this library, looks pretty nice and API is clear to use. Unfortunately, I found some issues with the View Hierarchy with the views which are associated.

Whenever method updateExpandableLayout invokes then we don't delete the previous elements of the view. In summary, we have an under the hood huge view hierarchy.

Current behaviour:

Screenshot 2019-10-07 at 15 11 04

I found some simple and fast fix to resolve this issue before invokes of updateExpandableLayout we add a removeAllViews method to clear our view, then view hierarchy looks much simpler.

Screenshot 2019-10-07 at 15 09 18

Expected Behavior:

We shouldn't have a redundant amount of views.

skydoves commented 4 years ago

@MBratkowski Hi, thank you for your issue :) It is applied!