0

i am trying to use a picture for the background of my blackberry app instead of the default white background how can i do this?

any code snippets would be greatly appreciated

Thanks

2
Contributors
4
Replies
6
Views
6 Years
Discussion Span
Last Post by shaneo123
0

here is the code i am using to set the picture as the background but its not doing it, all it is going is putting it in the top left hand corner and pushing the buttons down.

int mWidth = Display.getWidth();
     int mHeight = Display.getHeight();
     final Bitmap backgroundBitmap = Bitmap.getBitmapResource("superleague.jpg");
     HorizontalFieldManager BackGroundImage = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH |HorizontalFieldManager.USE_ALL_HEIGHT)
    {

         //Override the paint method to draw the background image.
        public void paint(Graphics graphics)
        {
             //Draw the background image and then call super.paint
             //to paint the rest of the screen.
            graphics.drawBitmap(0, 0, mWidth, mHeight,backgroundBitmap, 0, 0);
            super.paint(graphics);
        }
     };

Edited by peter_budo: Keep It Clear - Do use code tags when posting any code

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.