【发布时间】:2011-07-01 00:44:37
【问题描述】:
我有一个屏幕,其背景图像呈现如下:
bg = new VerticalFieldManager(
VerticalFieldManager.USE_ALL_WIDTH |
VerticalFieldManager.USE_ALL_HEIGHT |
VerticalFieldManager.NO_HORIZONTAL_SCROLLBAR |
VerticalFieldManager.NO_VERTICAL_SCROLLBAR |
VerticalFieldManager.NO_HORIZONTAL_SCROLL |
VerticalFieldManager.NO_VERTICAL_SCROLL) {
//Override the paint method to draw the background image.
public void paint(Graphics graphics) {
//Draw the background image and then call paint.
graphics.drawBitmap(Graphics.getScreenWidth()/2 - bgBitmap.getWidth()/2,
Graphics.getScreenHeight()/2 - bgBitmap.getHeight()/2,
bgBitmap.getWidth(), bgBitmap.getHeight(), bgBitmap, 0, 0);
super.paint(graphics);
}
};
add(bg);
然后我将屏幕的任何字段添加到此管理器。我有一个想要查看背景的 ListField。首次渲染屏幕时,一切正常。我可以看到图像。只要我向下滚动,选择某些内容并取消选择它,背景就会消失(变成白色)。
在绘制列表行时是否需要做一些特别的事情,以便在选择颜色消失后使它们真正透明?
注意:我发现无论在背景上绘制什么字段都会发生这种情况。它会正确显示,直到为给定的可聚焦字段绘制选择颜色,然后您选择其他内容。取消选择后,所有被选择颜色填充的区域都变为默认的白色。
【问题讨论】:
标签: blackberry