Hi there,
I’m experimenting with the StretchableLayoutManager component on a simple layout, made of two vertical cells and a resizer bar (StretchableLayoutResizerBar) in the middle.
During the initial setup, If I try to initialize the layout with an invisible cell, like that:
... layout.setItemLayout(0, 20, -1, -0.3); // left cell, preferred size = 30% layout.setItemLayout(1, 20, 20, 20); // resizer bar, preferred size = 20px layout.setItemLayout(2, 0, 0, 0); // right cell, initially invisible ...
The right cell is still visible on startup (and it shouldn’t) and then the left one can’t fill up the entire space as supposed. Dragging the resizer bar around fixes the issue, so I guess It’s a matter of how elements’ widths are computed internally in setItemLayout().
Having a 0-sized layout would be useful when you want to programmatically show or hide some cells, but maybe I’m on the wrong track. Any ideas on that?
Here is small project that reproduces the issue (just remove the .txt extension): NewProject.zip.txt (4.5 KB)