10-26-2009, 01:14 AM
Join Date: Oct 2009
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | change image at runtime
Please Login to Remove!
Hi friends i am new for blackberry and i am learning things now.
Can anyone help me in changing the image at run time (say on menuclick)
I have tried like this
public MenuItem Next = new MenuItem("Next", 110, 10)
public void run()
img = Bitmap.getBitmapResource(arr[i+1]);
EncodedImage ei = EncodedImage.getEncodedImageResource(arr[i+1]);
BitmapField bf = new BitmapField(ei.getBitmap(), BitmapField.FOCUSABLE );
where arr[i] has the array of image names.
I am displaying the first image in normal function itself
But unable to change images on clicking the menu item
It goes into the loop but it is not adding to the display screen
is in the constructor of main class
Does it like that it needs pushscreen always to change the screen
If so how can i do that.
help me in this regard