05-15-2010 10:24 PM
I am analyzing the UI controls for my application in the format shown in this image.
Small circles are the buttons for ui controls (to be made accessible by trackball) like on/off, speed, battery etc. Below is the slider bar showing progress of video displayed in center portion of the screen.
My question is, can such a UI be created for keyboard driven blackberry ? If yes, how should i go about it?
Solved! Go to Solution.
05-17-2010 02:32 AM
Yes is possible, you can extend a field make it focusable then override paint draw a circle, then override navicationClick. If you want to use a PNG file just extend BitmapField and override navigationClick.
05-17-2010 04:14 AM
You will need to be very careful with the use of Managers, or the positioning of your Fields on the Screen. In a BlackBerry, regardless of what the UI looks like, Fields are always rectangles. I would recommend that you review the two excellent videos on extending screen and extending manager, and this KB article:
How to - Create a custom layout manager for a screen
Article Number: DB-00117
05-17-2010 01:04 PM
Thanks Luis & Peter,
Based on my previous thread, i am able to use H & V Managers to place ui control buttons.Thats working fine.
How can i disable the buttons? Say, if i click the camera button, rest of the buttons should not be clickable any more. How can i do this?
05-17-2010 03:59 PM
I believe that you turn a button off by setting it Editable status to false.
Alternatively just include a check in the processing of the button click so that it is ignored when the button should not be active.
However probably the best way to is to extend the ButtonField and provide a setFocusable() method. Override isFocusable() and if it returns false, then the button will not be able to be selected. I use this method, however I have to say I've never done this on a Storm device.
I'm sure there are other ways too.
05-17-2010 05:25 PM
Thanks Peter, I will try this out.
Can you please give some ideas for implementing this:
The indicator bar (shown in figure in the1 post of this thread) shows the progress of images being displayed. Say, after dispalying 5 images, move progress bar by 4 pixel. Do we have any field to do this or do we have to implement it using H, V Field managers?
05-17-2010 07:00 PM
GaugeField does something similar, but have a look at this:
How to - Implement advanced buttons, fields, and managers
Article Number: DB-00796