Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 31
Registered: ‎03-17-2009
My Device: Not Specified

problems with Transparent Screen

[ Edited ]

Hello,

I am developing an application in which I have to use transparent screen (extends Screen).

I have done MyTransparentScreen class with such method:

 

  protected void paintBackground( Graphics g ) {
        XYRect myExtent = getExtent();
        int color = g.getColor();
        int alpha = g.getGlobalAlpha();
        g.setGlobalAlpha(20);

        ...
        g.setColor(color);
        g.setGlobalAlpha( alpha );
    }

 

 

 

But when i trying

 

pushScreen(new MyScreen());

pushScreen(new MyTransparentScreen());

 

I see Blackberry applications instead of expected MyScreen.

 

Thanks.

 

 

Message Edited by vannadiz on 03-17-2009 07:18 PM
New Developer
Posts: 23
Registered: ‎10-30-2008
My Device: Not Specified

Re: problems with Transparent Screen

you should not create a separate screen, all the drawings should take place on one screen and use alpha to make it transparent.

New Developer
Posts: 31
Registered: ‎03-17-2009
My Device: Not Specified

Re: problems with Transparent Screen

[ Edited ]
I _need_  separate screen for latter drawings=)
Message Edited by vannadiz on 03-18-2009 12:51 AM
Message Edited by vannadiz on 03-18-2009 02:15 AM
BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: problems with Transparent Screen


vannadiz wrote:

I see Blackberry applications instead of expected MyScreen.


I'm not sure what you are asking here.  Do you mean you see the home screen icons? Can you provide a screen shot?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker