Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change panes size after index change #15

Open
lsuski opened this issue Mar 7, 2014 · 2 comments
Open

Change panes size after index change #15

lsuski opened this issue Mar 7, 2014 · 2 comments

Comments

@lsuski
Copy link

lsuski commented Mar 7, 2014

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
Copy link
Author

lsuski commented Mar 10, 2014

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.

@karathb
Copy link

karathb commented Jan 23, 2015

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants