Hi Mobile Community,
I have created a view which uses the “split screen”-Feature. When I hit the back Button in that view I like to get rid of the split screen. For that I have two functions:
[b]public[/b] [b]int[/b] sidepane = 1;
[b]public[/b] [b]int[/b] mainpane = 0;
public void setPaneDimensions()
{
[b]if[/b] (TABLET_LAYOUT)
{
[b]int[/b] sidepane_width = Math.[i]min[/i] (([i]CURRENT_SCREEN_WIDTH[/i] * 40) / 100, [i]CURRENT_SCREEN_PPI[/i] * 2);
[b]int[/b] height = main_window.getHeight ();
main_window.setPaneDimensions (sidepane, [b]new[/b] [b]int[/b] [] { 0, 0, sidepane_width, height });
main_window.setPaneDimensions (mainpane, [b]new[/b] [b]int[/b] [] { sidepane_width, 0, [i]CURRENT_SCREEN_WIDTH[/i] - sidepane_width, height });
}
}
[b]public[/b] [b]void[/b] unsetPaneDimensions()
{
main_window.setPaneDimensions(mainpane, [b]new[/b] [b]int[/b] [] {0, 0, [i]CURRENT_SCREEN_WIDTH[/i], [i]CURRENT_SCREEN_HEIGHT[/i] });
main_window.setPaneDimensions(sidepane, [b]new[/b] [b]int[/b] [] {0, 0, 0, 0 });
}
The first function I call to enable the split screen that part is working.
In the second function I try to make the mainpane (index 0) full screen again to use it with the common transitionToView method. But then I get an exception:
xception in thread "Thread-5" java.lang.IllegalArgumentException
at com.softwareag.mobile.runtime.nui.nUIDisplayObject.setWidth( [u] nUIDisplayObject.java:145 [/u])
at com.softwareag.mobile.runtime.nui.nUIWindowDisplay.setPaneViewDimensions( [u] nUIWindowDisplay.java:319 [/u])
at com.softwareag.mobile.runtime.nui.nUIWindowDisplay.setPaneDimensions( [u] nUIWindowDisplay.java:291 [/u])
at com.softwareag.mobile.iprmobile.MyCanvas.unsetPaneDimensions( [u] MyCanvas.java:84 [/u])
at com.softwareag.mobile.iprmobile.MyCanvas.nUIEventCallback( [u] MyCanvas.java:635 [/u])
at com.softwareag.mobile.runtime.nui.nUIController.eventListenerCallback( [u] nUIController.java:427 [/u])
at com.softwareag.mobile.runtime.nui.nUIController.runOnce( [u] nUIController.java:188 [/u])
at com.softwareag.mobile.runtime.core.CanvasNativeUI.fixedRateUpdate( [u] CanvasNativeUI.java:67 [/u])
at com.softwareag.mobile.runtime.core.CanvasCore.runOnce( [u] CanvasCore.java:387 [/u])
at com.softwareag.mobile.runtime.core.CanvasThreading.run( [u] CanvasThreading.java:92 [/u])
at java.lang.Thread.run( [u] Thread.java:662 [/u])
Any idea how to get rid of panes at all? Something like removePanes()?
Thanks and have a nice weekend!
Marco