Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 14
Registered: ‎06-01-2013
My Device: BlackBerry Dev Alpha B
Accepted Solution

How open multiple screen together in Blackberry 10 like about page over my current application

Dear all,

 

Currently I am designing application in which there is one action button like Help or About.

 

When I click that button, I have done implementation such that it will call another html.

 

Using bb.pushScreen

 

When I came back from About.html it will load previous (main.html)

 

but in this way current setting and variables values are lost in main.html.

There are many apps which are doing this like they can slide About dialog as can see main app together.

 

Is there any way trick to show About dialog over Main.html and main.html is still running when I close About dialog.

 

Please help me!

Thanks

HB.

 

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: How open multiple screen together in Blackberry 10 like about page over my current application

You use bb.pushScreen to put a screen on the stack. You can use bb.popScreen to take it off again, so you shouldn't be loading main.html again - just push the new screens on and pop them off when you are done with it.

 

Your main.html you might never pop off or reload in many cases.

Tim Windsor
Open Source Technical Lead
Contributor
Posts: 14
Registered: ‎06-01-2013
My Device: BlackBerry Dev Alpha B

Re: How open multiple screen together in Blackberry 10 like about page over my current application

Hi, Thanks for reply.

 

tried bb.popscreen() but it will load previous screen right?

 

My curren case is like below

 

main.html -> there is one about button -> which will open About.html -> Now there is back button on about.html which will load previous html  (my case main.html) from stack right.

 

Now when main.html is loaded it will load its body and all my current status will be lost if they are set on main.html as defualt.

 

In some apps we can see previous screen by sliding current screen right, so we can see both screen together.

Do you know how to implement that in HTML5?

 

is it possible to see both main.html and about.html together?

 

Hoping for positive reply.

 

Thanks,

HB

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: How open multiple screen together in Blackberry 10 like about page over my current application

I think I understand 2 issues in what you are describing.

 

1 - you have data loaded into your main.html page by default and if it is changed by the user, it's not present when it's reloaded? You can work around this by having a global data object or by using localStorage. In your onscreenready function in the index, you can update the values of your data fields using the data in your global object or localStorage variables. If you look at the options page of the Sensors sample, you will see an example of having a screen update screen objects with global data values when it loads. https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Sensors

 

2 - you want to implement the Peek gesture in your app, so that you can slide one screen off to the right and see the one underneath at the same time. This feature is not included in the current bbUI.js. You can try to add it in, but we don't have any samples for it.

Tim Windsor
Open Source Technical Lead
Highlighted
Contributor
Posts: 14
Registered: ‎06-01-2013
My Device: BlackBerry Dev Alpha B

Re: How open multiple screen together in Blackberry 10 like about page over my current application

yes you are right.

 

I am mentioning for 2 issues.

By using your first advice and with some tricks I am able to solve my problem.

 

Instead of initializing in HTML page, I have to make new function which will initialize with default value and with current value as per requirement.

 

For 2nd : Peek gesture, I think bbjs should have this feature or some other way to implelent this.

as this is nice feature of blackberry OS.

 

Many apps has this feature so I thought to implement that in my app instread of back button use close button with Peek gesture.

if time permits I will check how to do. or if you have suggestion please let me know.

 

Thanks for your time and support!