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

Java Development

Reply
Regular Contributor
Posts: 54
Registered: ‎04-24-2010
My Device: 8900
My Carrier: simulator
Accepted Solution

UI Controls

Hi,

I am analyzing the UI controls for  my application in the format shown in this image.

 

http://picasaweb.google.com/shikha5579/SampleImages#5471685377447771410

 

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?

 

Thanks!

 

Developer
Posts: 91
Registered: ‎11-24-2009
My Device: Storm

Re: UI Controls

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.

-Luis Fernando

Remember to give Kudos(click on the star at your left) if this helped you.
Click on "Accept Solution" if the problem is resolved.
Espanol? Escribeme un mensaje privado.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: UI Controls

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
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...

Regular Contributor
Posts: 54
Registered: ‎04-24-2010
My Device: 8900
My Carrier: simulator

Re: UI Controls

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?

 

Thanks!

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: UI Controls

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.

Regular Contributor
Posts: 54
Registered: ‎04-24-2010
My Device: 8900
My Carrier: simulator

Re: UI Controls

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?

 

Thanks!

 

 

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: UI Controls

GaugeField does something similar, but have a look at this:

 

How to - Implement advanced buttons, fields, and managers
Article Number: DB-00796
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

Regular Contributor
Posts: 54
Registered: ‎04-24-2010
My Device: 8900
My Carrier: simulator

Re: UI Controls

Thanks Peter. I shall try as you suggested. I am closing this thread now.

 

Thanks!

New Contributor
Posts: 8
Registered: ‎11-18-2013
My Device: Dev Alpha
My Carrier: GSM

Re: UI Controls

[ Edited ]

The link get lost. I am curious what UI control you are talking about.

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified