I need to implement a fragment which an image view and below that multiple options each with a toggle button and each option have 2 seek bars. So if user disables the toggle button, in that case, that view of 2 seek bar will collapse in such a way that total length of the complete fragment will decrease in the same amount.
So if all the toggle buttons are disabled in starting and a total height of fragment is half of the screen in starting and if a user enables any toggle button, the seek bar view will be visible and height of fragment will also be increased by the same amount. and of course there is a limit on the max height and after that view will scroll.
Can someone help me if any UI lib is available for this? or any idea how it can be implemented?
Adding Image for help to understand problem:
Above First Image which have one seekbar enabled and view size increased
Above Second Image With all seek bars disabled and minimum size