BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
vetrivel Offline
New Member
 
Posts: 1
Join Date: Oct 2009
Model: 9530
PIN: N/A
Carrier: nil
Default change image at runtime - 10-26-2009, 02:14 AM

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 );

add(bf);

}

}//


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



pushscreen()

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



Thank you
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
MidnightDraven Offline
BlackBerry Genius
 
MidnightDraven's Avatar
 
Posts: 5,181
Join Date: Jan 2009
Location: Chester,UK
Model: 9000
OS: 4.6.0.291
PIN: N/A
Carrier: T-Mobile UK
Default 10-26-2009, 07:25 AM

Totally the wrong place to post


~Midnight Draven

"Hey, was he talking about what I think he was talking about?"
"If you mean time-traveling bunnies, then yes."
   
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.