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: 96
Registered: ‎06-09-2011
My Device: sdk 9800
My Carrier: java development

will the animated image work in popupscreen?

hi,

i have an animated spinning image and i just added to the popupscreen ,but the problem is image animation is not working....is there any way to work with animated image

 

 

below is my code

 

public

class PleaseWaitPopupScreen extendsPopupScreen {

 

 

publicPleaseWaitPopupScreen() {

 

super(newHorizontalFieldManager(),0);

 

 

Bitmap bitmap = Bitmap.getBitmapResource(

"wait30.gif");

BitmapField field=

newBitmapField(bitmap);

add(field);

 

}

publicstaticvoid showScreenAndWait(finalRunnable runThis) {

 

final PleaseWaitPopupScreen thisScreen = newPleaseWaitPopupScreen();

Thread threadToRun =

newThread() {

 

publicvoidrun() {

 

// First, display this screen

UiApplication.getUiApplication().invokeLater(

newRunnable() {

 

publicvoidrun() {

UiApplication.getUiApplication().pushScreen(thisScreen);

}

});

// Now run the code that must be executed in the Backgroundtry{

runThis.run();

}

catch(Throwable t) {

t.printStackTrace();

thrownew RuntimeException("Exception detected while waiting: "+ t.toString());

}

// Now dismiss this screen

UiApplication.getUiApplication().invokeLater(

newRunnable() {

 

publicvoidrun() {

UiApplication.getUiApplication().popScreen(thisScreen);

}

});

}

};

threadToRun.start();

}

 

}

Press the Kudos button (star) on the left side to thank and
please mark the Thread as solved if its solved...


Thanks and Regards
Nagarjuna
Developer
Posts: 455
Registered: ‎01-14-2009
My Device: Apple iPhone 3GS 16GB

Re: will the animated image work in popupscreen?

Off the top my head i can think of an issue were "gif" files were converted to PNG so it would lose the animation. try to rename the .gif to somethign else (example.bin) and try 

 

let me know if that worked

Developer
Posts: 16,998
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: will the animated image work in popupscreen?

rihan007 has a point, but this is only the case if the option is checked in eclipse.

more important is that BB does not support animated gifs by default.
this KB article will help you:
http://supportforums.blackberry.com/t5/Java-Development/Display-an-animated-GIF/ta-p/445014
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter