如何添加位图图像作为BlackBerry自定义对话框的背景

如何添加位图图像作为BlackBerry自定义对话框的背景,blackberry,Blackberry,我知道如何通过替代绘制和子布局方法来创建自定义对话框。我想将普通位图图像作为背景添加到我正在创建的自定义对话框中。有人知道这个问题的解决办法吗 希望这就是你想要的 backgroundBitmap = Bitmap.getBitmapResource("background.png"); //Override the paint method to draw the background image. public void paint(Graphics graphics) {

我知道如何通过替代绘制和子布局方法来创建自定义对话框。我想将普通位图图像作为背景添加到我正在创建的自定义对话框中。有人知道这个问题的解决办法吗

希望这就是你想要的

backgroundBitmap = Bitmap.getBitmapResource("background.png");
//Override the paint method to draw the background image.
    public void paint(Graphics graphics) {
        //Draw the background image and then call paint.
        graphics.drawBitmap(0, 0, 240, 240, backgroundBitmap, 0, 0);
        super.paint(graphics);
    }            

谢谢你的回复,但没什么帮助。我已经试过你的代码了,看看这个问题,它是有效的