在黑莓中,我开发了一个屏幕,在背景中显示大小为 480 X 360的图像。我的BB屏幕大小为480 X 360.由于图像的大小在我滚动时有点大 垂直屏幕滚动和干扰我的屏幕。我想要 锁定滚动,这样我将无法进行垂直滚动。 可能是我要问一个很简单的问题,但我真的没有时间去谷歌 作为now.Please的帮我做这件事黑莓:禁用垂直滚动
我的代码如下:
public LaunchXtcMsngrScreen()
{
int intwidth = Display.getWidth();
int intheight = Display.getHeight();
//getting the height/width of BB screen
Debugger.debug(UrlInfo.workflow_File,"Screen Height ="+intheight);
Debugger.debug(UrlInfo.workflow_File,"Screen Width ="+intwidth);
BMbackground = Bitmap.getBitmapResource("xtclogo.jpg");
VerticalFieldManager VFM = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH
| VerticalFieldManager.USE_ALL_HEIGHT
| VerticalFieldManager.NO_VERTICAL_SCROLL
| VerticalFieldManager.NO_VERTICAL_SCROLLBAR)
{
//Override the paint method to draw the background image.
public void paint(Graphics graphics)
{
//Draw the XTC Messenger logo
graphics.drawBitmap(0, 0,Display.getWidth(),Display.getHeight(),BMbackground, 0, 0);
super.paint(graphics);
}
};
Bitmap registerbitmap = Bitmap.getBitmapResource("register_button.PNG");
BFregister = new ImageButtonField(registerbitmap);
BFregister.setMargin(245,0,0,190);//vertical pos,0,0,horizontal pos
VFM.add(BFregister);
add(VFM);
}
问候, 约杰什乔杜里
真的吗? “可能是我问了一个非常简单的问题,但我真的没有时间到现在谷歌。请帮助我做到这一点” – 2011-01-13 15:21:15