Background Image problem
Please Login to Remove!
Hi,
I have a screen in which I have set a Background Image. The background Image has been added using the following code:-
mainVfm = new VerticalFieldManager(VerticalFieldManager.NO_VERTI CAL_SCROLL|VerticalFieldManager.NO_VERTICAL_SCROLL BAR|VerticalFieldManager.USE_ALL_WIDTH){
protected void sublayout(int maxWidth, int maxHeight){
super.sublayout(maxWidth, maxHeight);
setExtent(Display.getWidth(), Display.getHeight());
}
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, graphics.getScreenWidth(), graphics.getScreenHeight(),bckground, 0, 0);
graphics.drawBitmap(20, 10, graphics.getScreenWidth(), graphics.getScreenHeight(),logo, 0, 0);
graphics.setColor(Color.WHITE);
// graphics.setGlobalAlpha(0);
super.paint(graphics);
}
};
The problem is that, in simulator 8100, the Image covers the entire screen,
but in 8300 simulator, it does not cover the entire screen as the 8300 screen is wider.
How to solve the problem, so that the background Image is displayed the same, covering the entire screen, in all the simulators?
Regards,
Flavian
|