开发者

Use of subpaint() on Mainscreen Doesn't paint child correctly

To get a quick background of the problem please refer to Create Transparent Mainscreen in Blackberry .

The problem I am facing is with painting of the child on mainscreen. I wanted my mainscreen to look transparent/translucent as an original requirement and add my other UI elements e.g. managers/field on top of it.

So the UI elements I am using 开发者_JS百科are 3 BitmapField(s) which should have its thick border created using BorderFactory.createSimpleBorder() with two colors added for Field.VISUAL_STATE_FOCUS and Field.VISUAL_STATE_NORMAL states. all of these BitmapFields are added in their respective HorizontalFieldManger which in turn are added to the screen.

So part of the problem is, when I do navigation across these BitmapFields, "some area" of the border added to the BitmapFields doesn't get painted as per the state (normal, focus) specified.

Other problem is, on torch 9800 when I navigate across from top to bottom or vice versa, i see default scroll happening which should be normal however on each scroll my BitmapField leaves some tail/crack on the screen when movement happened on the scrolling.

None of such things happen when I use normal screen (not use subpaint to make the screen transparent).

Do you have any idea what's happening here..?

  • Big O


YMMV, but I've made a transparent screen with this:

public class TranslucentScreen extends Screen {
    public TranslucentScreen() {
        super(new VerticalFieldManager(USE_ALL_WIDTH | NO_VERTICAL_SCROLL));
        setBackground(BackgroundFactory.createSolidTransparentBackground(0x000000, 150));
    }
    protected void sublayout(int width, int height) {
        setPosition(0, 0);
        setExtent(width, height);

        setPositionDelegate(0, 0);
        layoutDelegate(width, height);
    }
}

This was for a basic popup screen screen I made that had a semi-transparent black background. I added a VerticalFieldManager to the screen that I controlled the background painting on so it would be how I wanted it, and then added my other Fields to that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜