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

Posts: 64
Registered: ‎08-07-2008
My Device: Not Specified

Need advice to create interactive icons.

I want update my UI to a more fancy one make it like RIM's native applications.


When users start my application, it will list a few shortcut icons/buttons for each specific functionality. I want to cutomized all these icons to make them look more fancy.


For example,

1. they use bitmap.

2. when you move the focus on each icon/button, it changes to another bitmap. Just like RIM's application, like curve, when you move the trackball around, the focus change to a yellow circle around the selected app and that app's image is changed to another one. (such as addressbook is changed from close to be opened...) 


Can anyone suggest me some sample code of doing this? I believe I should cutomized a filed class. But I want to see how other people do this job so that I can learn from you.


Thanks in advance!

Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Need advice to create interactive icons.

Subclass BitmapField and make sure that you override isFocusable() to return true.


You can store the 2nd (focus) bitmap and override paint() and drawFocus() to paint the correct image and your custom focus indicator.


BlackBerry Development Advisor
Posts: 15,871
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Need advice to create interactive icons.

And you can find a sample of what RexDoug mentions here.


How To - Show focus changes using BitmapField
Article Number: DB-00427


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.