03-21-2013 08:23 AM
Am new to the blackberry 10 development, i have requirement in one of my application that, the action bar(action type is 'tab' and its overflow is true) should be visible after user selected the action item and new screen is pushed (other html file), how can i do this. any help is appriciated .
and also i have tried to add actionbar tothe index.htm file but it couldn't rendered as html, it comes as plain div tags and even its not visible on the screen.
Please help me on this.
03-26-2013 02:20 PM
03-27-2013 11:14 AM
03-27-2013 01:34 PM
No. my requirement is simple my actionBar should always be visible on the screen when i pushed(navigate to ) 'n' number of screens(basically different html files pushed) on the screen stack.
03-27-2013 04:58 PM
There are two options:
1) Leverage the built-in fragment loading of BBUI.js to swap screens. However note that whenever you load a new screen / fragment, the entire contents of your previous fragement gets replaced, including any action bar you have defined there. This approach would require re-defining the action bar in every fragment and setting it to look as if the user just interacted with it.
2) Use one HTML fragment with an action bar defined, that also has smaller fragments defined within itself. An example of this is here:
Note the buttons, tabs, and tabOverflow elements.
You can then use a simple display: none / inline method to show/hide content as required:
Basically, you need to avoid swapping fragments with the default BBUI.js screen changes, and load your content in dynamically yourself.
Personally, I would recommend the second approach as recreatin the action bar on each interaction could lead to some overhead.