Search code examples
blackberryblackberry-jde

Wait screen with animation error - BlackBerry


enter image description here

Above is my screenshot I am getting while displaying the wait screen using ActivityIndicatorView. Any idea why my spinner image is being displayed within a narrow strip?

My code is:

ActivityIndicatorView act = new ActivityIndicatorView(Field.FIELD_HCENTER);
Bitmap spinImage = Bitmap.getBitmapResource("img/spinner.jpg");
act.createActivityImageField(spinImage, 9,Field.FIELD_HCENTER );
LabelField label = new LabelField(message);
DialogFieldManager manager = new DialogFieldManager();
popup = new PopupScreen(manager);
manager.addCustomField(label);
manager.addCustomField(act);

EDIT: Spinner Image
enter image description here
EDIT 2: Full spinner image only when No. of frames = 1 and image = spinner.gif enter image description here


Solution

  • Thanks Nate and Rupak.
    I leave this for others facing similar issue.
    I simply had to use the width of the image frames be the width of a frame multiplied by the total number of frames. Reference here


    I set the number of frames 4 and image: enter image description here