06-09-2009 09:26 AM
I used the KB Article How To - Display an animated GIF to display a loading GIF. It works but the after the first frame the Field isn't rendert in the correct position.
loader_mgr.add(new AnimatedGIFField(_loader, DrawStyle.HCENTER));
Any Ideas how to handle this?! Thanks!
12-03-2012 09:19 PM
12-04-2012 04:32 AM
Can't see the image, can you put it somewhere public and link to it?
I have had issues with some animated gifs where the image that was drawn was in the same place, but the 'movement' parts were not drawn correctly. So it did not loose positional alignment - the image was just not correct. Since I can't see the image I can only guess you are seeing something similar. Try a few animated GIFs, including the one supplied, to see if the result is GIF specific.
I don't think it is possible for an animated GIF Field to move its position while playing, so I don't think changing the Style will help here.
12-08-2012 12:48 PM
I had the same problem and I could solve it changing the parametter inside of the above class.
In the vertical field manager or screen class you can write:
GIFEncodedImage myGIFImage =(GIFEncodedImage)GIFEncodedImage.getEncodedImageR
AnimatedGIFField image_field = new AnimatedGIFField(myGIFImage);
image_field.setMargin(62, 0, 0, 0);
The 62 number is my custom top position.
In the AnimatedGIFField class constructor below, you really need to make the change as...
public AnimatedGIFField(GIFEncodedImage image)
Remember that your image file cannot be in .gif type, because it wil be converted to .png type by the system.
I solved the problem...
12-08-2012 01:11 PM
As noted, I think you solved a different problem. I don't think it is possible for the animated gif to move postion while playing. If it moves, it is something external (like a scroll), nothing to do with the Style, or the margin. But that is just my opinion.
12-08-2012 01:32 PM