08-17-2011 06:36 AM
Hi all,
How do I make a background to scale and fit the width of a screen?
I've done the following, which lets the background fit the width of the screen but it is not scaled so parts are cut out.
The background also repeats as I used USE_ALL_HEIGHT.
I just want a background image to scale to the width of the screen.
Please help...
public class newScreen extends MainScreen {
Bitmap backgroundBitmap = Bitmap.getBitmapResource("background.png");
Background bg = BackgroundFactory.createBitmapBackground(backgroun dBitmap);
public IntroStoryScreen() {
VerticalFieldManager hfm = new VerticalFieldManager(
VerticalFieldManager.USE_ALL_HEIGHT
| VerticalFieldManager.USE_ALL_WIDTH);
hfm.setBackground(bg);
this.add(hfm);
}
}-James
08-17-2011 06:57 AM
Do a search in this forum (see Search box top right) on scale or scaling, there are many other Threads that discuss this sort of issue.
08-17-2011 07:39 AM
08-17-2011 08:06 AM
try using Repeat_None
property of Background class