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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: Transparent popup screen?

There aren't any APIs to do this programatically.  This is controlled by the theme the BlackBerry is using (set under Options, Theme).
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
Blanc
Posts: 638
Registered: ‎07-02-2009

Re: Transparent popup screen?

Hi all,

                i need to add two different animated gifs to my screen. i take a manager  and am able to add only one animated gif at a time. none of the other fields are not adding. even paint method is also not working. i do not know how to manage all these. please suggest me how to fix this. 

 

          my requirement is i need to add two different animated gifs to my screen. when use add(gif1) ;, add(gif2);, only one gif1 is adding other 

is not. in addition to these i need to add some fields. i use the code of animatedgiffield for this purpose.

 

Thanks and Regards,

PraveenGoparaju 

Thanks and Regards,
PraveenGoparaju.
Please use plain text.
Developer
Developer
rab
Posts: 283
Registered: ‎07-22-2008

Re: Transparent popup screen?

rkao1

 

I am not sure if  I am missing something about your requirement, but how about playing with the globalAlpha value.

 

Where you modify the globalApha in the paint or paintBackground() method.

 

Something like:

 


    protected void paint(Graphics graphics)
    {
           int alpha = graphics.getGlobalAlpha();
           graphics.setGlobalAlpha(0x4F);
           graphics.setBackgroundColor(Color.DARKGRAY);
           graphics.clear();
           graphics.setGlobalAlpha(alpha);
                  
        super.paint(graphics);
    }

You modify the value of alpha to suite your need.

I did use this suggested idea in the past with customized popup screens and it worked fine.

 

Rab

Please use plain text.
Developer
Blanc
Posts: 638
Registered: ‎07-02-2009

Re: Transparent popup screen?

Hi all,

 

        I got the popupscreen successfully, but i have a small problem yet. the popupscreen is having the black border how can i remove that border or how can i overwrite the black color with the background color of my manager. 

 

 

 

Thanks and Regards,

PraveenG. 

Thanks and Regards,
PraveenGoparaju.
Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009

Re: Transparent popup screen?

I have the same situation here. How can I overwrite that border color?

Please use plain text.
Developer
Blanc
Posts: 638
Registered: ‎07-02-2009

Re: Transparent popup screen?

override the applyTheme(Graphics g, boolean on) of the popup screen. it will solve the problem.

 

protected void applyTheme(Graphics g, boolean on){

//

}

Thanks and Regards,
PraveenGoparaju.
Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009

Re: Transparent popup screen?

Thanks, but it didn't work to me. Can you post some of your code?

Please use plain text.
Developer
Blanc
Posts: 638
Registered: ‎07-02-2009

Re: Transparent popup screen?

this is my working sample code:

 

 

public class PrintPopup extends PopupScreen 
{
	public PrintPopup()
	{
		super(new VerticalFieldManager());
		this.setBackground(BackgroundFactory.createSolidTransparentBackground(Color.ALICEBLUE, 0));
		add(new MyOwnManager());

	}
	
	protected void applyTheme() {

    }

	
	 
}

 

 

Thanks and Regards,
PraveenGoparaju.
Please use plain text.