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
Developer
kumaresan
Posts: 183
Registered: ‎12-17-2008
My Device: 8320

Is it possible transparent background in paint?

Hi All.,

 

Is it possible to display transparent background for paint...

 

For example:

 

I have to pushscreen for paint display... Currently it will create full screen for display..

 

i want that will happen in transparent background... It means,you launch your application

 

from your homescreen! that time paint will be painted as well home screen background

 

also you can view(whatever screen you have, paint display will be paint in transparent background)

 

How can i solve this problem...

 

i hope somebody can help me!!! Thanks

 

 

kums

******************************

Press kudos which the post help you
Please mark posts as solved if you got a solution
Please use plain text.
Developer
bikas
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified
Please use plain text.
Developer
simon_hain
Posts: 16,131
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Is it possible transparent background in paint?

uiapplications always have a white background.
you will have to extend application and push a global screen using the Ui class. If you create this screen with a smaller size the homescreen will stay visible behind it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
kumaresan
Posts: 183
Registered: ‎12-17-2008
My Device: 8320

Re: Is it possible transparent background in paint?

Thanks For reply,

 

if i used globalscreen,same fullscreen view will be displayed..

 

Called globalscreen from another screen A:-

 

      1.UiApplication.getUiApplication().pushGlobalScreen(sObj,1,UiEngine.GLOBAL_MODAL);

 

Following code represent called Screen B:-

 

     2.

         public class ScreenB

            {

                   public void paint(Graphics g)
                   {

                      g.drawBitmap(0, 0, this.getWidth(), this.getHeight(),settings.getBackGround(), 0, 0);
                      g.setColor(Color.BLACK);
                      g.drawRoundRect(9, this.getHeight()/2-1, this.getWidth()-18, this.getHeight()/2-8,10,10);
                      g.setColor(Color.WHITE);
                      g.fillRoundRect(10,this.getHeight()/2,this.getWidth()-20,this.getHeight()/2-10,10,10);
                      g.setColor(settings.getColorTextTitle());
                      g.setFont(settings.getFontTitle());
                      g.drawText(sBannerValue[2],15,this.getHeight()/2+3);
                      g.drawLine(10,this.getHeight()/2+23,this.getWidth()-11,this.getHeight()/2+23);

 

                   }

            }

 

like this...

 

you are mentioned to develop smaller screen, in this paint how can i achieve?

 

help me...

 

Thanks again.

kums

******************************

Press kudos which the post help you
Please mark posts as solved if you got a solution
Please use plain text.
Developer
simon_hain
Posts: 16,131
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Is it possible transparent background in paint?

extend Application, not UiApplication.
given a horizontalfieldmanager hfm this pushes a popupscreen with overwritten escape-key to close it: 

Ui.getUiEngine().pushGlobalScreen(new PopupScreen(hfm) {
protected boolean keyChar(char c, int status, int time) {
if (c == Characters.ESCAPE) {
System.exit(0);
}
return super.keyChar(c, status, time);
}
}, 1, UiEngine.GLOBAL_QUEUE);

 

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
Blanc
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Re: Is it possible transparent background in paint?

Hi all, please tell me the way to do this.

 

        am having two screens one as the foreground and other as the background. how can i implement it? i extended a class from Application.

in that i defined my main(), and from its constructor i called the screen using pushglobalscreen method. but i didnt get the way. it gives a run time exception. so i need your help. please tell the way in detail.

 

 

 

 

 

have a nice time. 

Thanks and Regards,
PraveenGoparaju.
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Is it possible transparent background in paint?

@Blanc, Give a look at this KB article.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.