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

Web and WebWorks Development

Reply
Highlighted
Contributor
Posts: 10
Registered: ‎02-11-2013
My Device: 9900
My Carrier: airtel

Two images for loading.gif

hello all, 

 

 

here is my code for in which i am trying to impelement the loading screen for my bb app,

 


GIFEncodedImage bitmapImage=(GIFEncodedImage)GIFEncodedImage.getEncodedImageResource("loading.agif");
image_field=new AnimatedGIFField(bitmapImage,Field.FIELD_HCENTER|Field.FIELD_VCENTER);
hfm = new VerticalFieldManager(USE_ALL_WIDTH|USE_ALL_HEIGHT) {
protected void sublayout(int maxWidth, int maxHeight) {
super.sublayout(Display.getWidth(), Display.getHeight());
setExtent(Display.getWidth(), Display.getHeight());
}
};

int padding = (Display.getHeight() - 16) / 2;
if (padding > 0) {
image_field.setPadding(padding, 0, 0, 0);
}

hfm.add(image_field);
add(hfm);
add(_browserField);

 

 

but this is showing two loading.gif, one is moving and other one is static, can you all help why is it so.