Попробуйте этот код:
public class Def extends MainScreen
{
VerticalFieldManager vertical;
BitmapField bitmapField;
int px=0,py=0;
public Def()
{
vertical=new VerticalFieldManager()
{
protected void sublayout(int maxWidth, int maxHeight)
{
super.sublayout(Display.getWidth(),Display.getHeight());
setExtent(Display.getWidth(),Display.getHeight());
}
};
vertical.setBackground(BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("background.png")));//put here map image;
bitmapField=new BitmapField(Bitmap.getBitmapResource("rectanagle.png"));//For moving give small image;
vertical.add(bitmapField);
add(vertical);
}
protected boolean navigationMovement(int dx, int dy, int status, int time)
{
px=px+dx;
py=py+dy;
XYEdges xyEdges=new XYEdges(py, 0, 0, px);
bitmapField.setPadding(xyEdges);
vertical.invalidate();
return super.navigationMovement(dx, dy, status, time);
}
}