如何设置黑莓手机的背景
我使用以下内容为黑莓设置背景..没有错误,但在输出中 当我向下滚动时,图像会重复..如何解决这个问题。请帮助我
public final class MyScreen extends MainScreen
{
Bitmap background;
public MyScreen()
{
background = Bitmap.getBitmapResource("CVMS.jpg");
VerticalFieldManager vfm = new VerticalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH |
VerticalFieldManager.NO_VERTICAL_SCROLL);
vfm.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("CVMS.jpg"),Background.POSITION_X_LEFT,Background.POSITION_Y_TOP,Background.REPEAT_INHERIT));
add(vfm);
}
}
this is my complete code
i have used the following to set a background for blackberry ..no errors but in the output
when i scroll down the image gets repeated .. how to solve this problem .please help me
public final class MyScreen extends MainScreen
{
Bitmap background;
public MyScreen()
{
background = Bitmap.getBitmapResource("CVMS.jpg");
VerticalFieldManager vfm = new VerticalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH |
VerticalFieldManager.NO_VERTICAL_SCROLL);
vfm.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("CVMS.jpg"),Background.POSITION_X_LEFT,Background.POSITION_Y_TOP,Background.REPEAT_INHERIT));
add(vfm);
}
}
this is my complete code
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要做的就是更改以下行中的标志
您只需使用
REPEAT_SCALE_TO_FIT
而不是REPEAT_INHERIT
All you need to do is change a flag in the following line
You just need to use
REPEAT_SCALE_TO_FIT
instead ofREPEAT_INHERIT
您是否尝试过使用Background.REPEAT_NONE?
Have you tried using Background.REPEAT_NONE ?