nUINavView
com.softwareag.mobile.runtime.nui.nUINavView
Use to display the navigation view.
The navigation view has different formats based on the platform. For example, for some platforms the navigation view might display as a menu bar that is always visible and uses both icons and text. For other platforms, the navigation view might have hidden menu items that are displayed only when a user presses a button.
Usage Notes
Note: The
nUINavbuttonElement object should
not represent Back buttons. That is, the object’s
Type attribute should
not be set to
nUINavbuttonElement.TYPE_BACK.
The following are platform-specific considerations:
Android | It is recommended to limit the number of buttons you add to a nUINavView object to 6 buttons. If you add more than 6 buttons, a More button displays on some Android devices. |
iOS | It is recommended to limit the number of buttons you add to a nUINavView object on an iPhone in full-screen portrait mode to 8 buttons. |
Example
This code sample displays a navigation view. Details on how the example code is rendered on various platforms follow the code sample.
protected nUIViewDisplay onCreateMainNavbarView()
{
//loadImage calls Image.createImage() with the appropriate path and file
extension.
navbar_view = new nUINavView(NUIID_NAV_VIEW);
navbar_view.setVscrollable(false);
navbar_view.setBgcolor (0);
navbar_view.add(new nUINavbuttonElement(-1, "Lorem",
loadImage ("ChartArea")));
navbar_view.add(new nUINavbuttonElement(-1, "Ipsum",
loadImage ("ChartPie")));
navbar_view.add(new nUINavbuttonElement(-1, "Dolor",
loadImage ("ChartBar")));
return navbar_view;
}
Platform | Platform-Specific Class and Visual Reference |
Android | Custom code to emulate a split action bar |
iOS | UITabBar |