Custom Pop up with no Black background in blackberry

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 15:54:55
public class CustomDialogBox extends PopupScreen {

    Bitmap mDialogImg=null;
    public CustomDialogBox(Bitmap dialogImg) {
        super(new VerticalFieldManager(),Field.FOCUSABLE);
        this.mDialogImg=dialogImg;
        VerticalFieldManager vfm=new VerticalFieldManager() {
            protected void paint(Graphics graphics) {

                graphics.drawBitmap(0, 0, mDialogImg.getWidth(), mDialogImg.getHeight(), mDialogImg, 0, 0);
            };

            protected void sublayout(int maxWidth, int maxHeight) {

                super.sublayout(mDialogImg.getWidth(), mDialogImg.getHeight());
                super.setExtent(mDialogImg.getWidth(), mDialogImg.getHeight());
            }
        };

        add(vfm);
    }

    protected void applyTheme() {
    }

}

I tried the following program and it works perfectly fine i added a Bitmap image to a vertical field manager and then using the method

applyTheme() as follows

protected void applyTheme() {
}

i do get the required results

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!