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
BlackBerry Development Advisor
Posts: 15,753
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
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.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

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.
Developer
Developer
Posts: 283
Registered: ‎07-22-2008
My Device: Not Specified

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

Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

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.
Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Transparent popup screen?

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

Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

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.
Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Transparent popup screen?

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

Highlighted
Developer
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

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.