11-20-2009 10:55 AM
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
Solved! Go to Solution.
11-20-2009 12:12 PM
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.
12-04-2009 06:45 AM - last edited on 12-04-2009 07:01 AM
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;
12-04-2009 07:25 AM
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.
12-04-2009 07:31 AM
Great, thank you!
12-04-2009 08:21 AM
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.

Same html in Firefox:

06-13-2010 05:10 AM
06-13-2010 07:31 AM
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.