Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
Aepfel
Posts: 22
Registered: 11-18-2009
Accepted Solution

Interface API - bottom menu and input dialog?

Hi there!

 

It would be preferable if a widget would look very much like a native app on the BlackBerry so I just wondered if there will be anything like an text-input Dialog?

 

Like "Please Enter a Location" "__________" (OK )

 

Something else I would really love: In some applications like BlackBerry Map or Calendar there is an standard menu on the bottom of the screen. Is there an Widget API for that?

 

Regards,

 

Alex

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: Interface API - bottom menu and input dialog?

For the standard menu take a look at the "blackberry.ui.menu" object...

 

You can do prompting dialogs in "blackberry.ui.Dialog".. as for an input box, you will want to do a relatively positioned <div> that is positioned on a layer above your screen's html.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
Aepfel
Posts: 22
Registered: 11-18-2009

Re: Interface API - bottom menu and input dialog?

[ Edited ]

Hi! 

 

Sorry I dont talk about the standard "DropUp" menu but the menu on the bottom of an app (like the Calendar App uses one).

Is there an API for that or is it at least allowed to rebuild it with HTML?

 

If so, there is another problem: I can not set a fixed Element to the bottom of the Widget by

 

<css> 
bottom: 0px;position:fixed
</css>

 

Anyway

top: 430px;

 

 

works, but is not very nice! (I dont want to handle different screen resolutions, if possible...at least not at this level)

 

Also when scrolling on a Widget, the fixed elements kind of scroll with the widget and then jump back, instead of staying at the fixed position. Is this a behavior only in the simulator or also on the real devices?

 

Win XP Prof, BlackBerry 9500 Simulator

 

EDIT:

 

Very interesting but useless:

 

top: 430px; has the same rendering result as  bottom: -480px;

 

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: Interface API - bottom menu and input dialog?

The jumping on a fixed positioned div is something you will see on a real device as well.  It is a limitation of the BlackBerry browser when scrolling with fixed position content.

 

From what you are describing it sounds like you want the Toolbar that is available on the storm device that allows you to put 4 buttons at the bottom of the screen.  We currently don't have an API available for you to enable the Storm toolbar.  

 

However, I have seen others accomplish this same effect by making a table the size of screen and then have a scrolling div statement positioned for the top part of the screen and then table cells for the buttons at the bottom.  This would then be usable for both touch screen and trackpad/trackball devices.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
Aepfel
Posts: 22
Registered: 11-18-2009

Re: Interface API - bottom menu and input dialog?

Great, thank you!

Please use plain text.
Developer
Aepfel
Posts: 22
Registered: 11-18-2009

Re: Interface API - bottom menu and input dialog?

Mh alright I tried that with a small following piece of code:

 

 

<html>
<table>
<tr><div style="background-color: #000000;color: #ffffff;"> HEADER </div></tr>
<tr><div style="height:100px;overflow: auto">CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT<br/>CONTENT</div></tr>
<tr><div style="background-color: #000000; color: #ffffff;"> MENU </div</tr>
</table>
</html>

 It works somehow but there are some really big design problems with that too:

 

 

1. See screenshot. The Scrollbar behaves weird. It "cuts" the <div> Elements below and above. (2. Screenshot is comparison in Firefox, how it "should" behave...)

 

2. In the Simulator I can not use the scrollbar.

 

image from blackberry simulator

 

Same html in Firefox:

 

 

 

 

 

Please use plain text.
New Developer
devlin
Posts: 6
Registered: 05-31-2010
My Carrier: Orange UK

Re: Interface API - bottom menu and input dialog?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: Interface API - bottom menu and input dialog?

Unfortunately the scrollable <div> section to allow for a toolbar on the top or bottom of the screen will only work on touch base devices such as the Storm.  Scrolling this <div> will not work with the trackpad navigation mode for widgets.  This is because the browser will not allow for scrolling of the <div> through JavaScript.

 

We're looking at the possibility of creating top and bottom toolbars as part of the widget SDK.  No timelines yet, but we are investigating how this may work.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.