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: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company

BitmapField changes two Bitmap at run time


       I have two images and i want change these images on  the BitmapField .

      e.g if i click the bitmapField then i want to set the second image and after it when i click  then i want to set the first  

      image .

     problem is that i fail to know which image(  first or second ) currently  set on the BitmapField.

Posts: 285
Registered: ‎08-06-2010
My Device: Z10

Re: BitmapField changes two Bitmap at run time

I would suggest creating your own BitmapField class where you create a different setBitmap method. In this method, you could have setBitmap(bitmap, string) and save the string in a variable.

Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: BitmapField changes two Bitmap at run time

Hi @


You can use the setCookie function to keep an object which identifies the image, for example:  a string containing the image name.