View Single Post
Old 06-26-2009, 08:58 AM   #1 (permalink)
Morion
Knows Where the Search Button Is
 
Join Date: Jun 2009
Location: Belarus, Minsk
Model: none
PIN: N/A
Carrier: none
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down trouble with background

Please Login to Remove!

I want to have a background in my app. Here is the code.
Code:
	
private void createUI(){
		backGround = Bitmap.getBitmapResource("bg.jpg");
		myManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR){
			public void paint(Graphics graphics){
				graphics.clear();
				graphics.drawBitmap(0, 0, Display.getWidth(), Display.getHeight(), backGround, 0, 0);
				super.paint(graphics);
			}
		};
		
		add(myManager);
	}
In the debug mode i see, that backGround is not null. But i cannot see my background picture on the display of simulator. Any ideas?

P.S. I use Eclipse. And please, dont tell me about Background class. I want to do it using 4.5.0 APIs.
Offline   Reply With Quote