Android-PanesLibrary icon indicating copy to clipboard operation
Android-PanesLibrary copied to clipboard

Change panes size after index change

Open lsuski opened this issue 10 years ago • 2 comments

Hi, I'd like to make panes size dependent of current panes configuration, e.g. I have 4 panes and only 3 visible at time (1-2-3 or 2-3-4), I want first visible pane to be always 0.25 of available size. The problem is that PaneSizer is called only at the beginning and I can't request onMeasure on PaneView (invalidate & requestLayout on PanesLayout doesn't work) while scrolling (or after index changed). Size of pane no. 2 is measured once and when it becomes first visible pane it is partially covered by pane no. 3. Do you have any suggestions how to manage this?

lsuski avatar Mar 07 '14 15:03 lsuski

I managed to request panes remeasurement (invoke requestLayout on panes in PanesLayout.setIndex() ) but it doesn't behave correctly beacuse the computation of visible indexes is dependent of panes width and this in turn is dependent ( in my scenario) of visible indexes. I am not sure if is this even possible to manage. I'd appreciate any suggestions about it.

lsuski avatar Mar 10 '14 13:03 lsuski

late, but i had the same problem, so i write what i did: when you add a new pane, just set the visiblity of other panes to Gone. I mean 0 is the menu, lets say 2 is the current. then set getPane(1).setVisiblity(View.Gone).

karathb avatar Jan 23 '15 11:01 karathb