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
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

BackgroundFactory to create transparent background

Is it possible to use BackgroundFactory to create background with some transparency? or any workaround to achieve that?

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
simon_hain
Posts: 15,944
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: BackgroundFactory to create transparent background

should be possible. but the background of the screen will still be white.

----------------------------------------------------------
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.
Regular Contributor
vedernikov
Posts: 67
Registered: ‎09-30-2009
My Device: Not Specified

Re: BackgroundFactory to create transparent background

Does BackgroundFactory.createSolidTransparentBackground() work for you?

Another approach could be to use the transparent bitmap with BackgroundFactory.createBitmapBackground().

Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: BackgroundFactory to create transparent background

 

just didn't thought that thing exists, I must check the APIs first  before posting on forum.

thanks for the prompt response.

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: BackgroundFactory to create transparent background

I am actually using BackgroundFactory.createLinearGradientBackground it dont accept alpha as parameter, not event the color value itself is having alpha.

 

Any thoughts how to achieve that in gradient itself. I think i may have to use drawFilledPath or something like this to create gradient with a bit of transparency.

 

 

 

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.
Developer
mohitsharma
Posts: 190
Registered: ‎10-22-2009
My Device: Blackberry Torch

Re: BackgroundFactory to create transparent background

will go currently with solidTransparentBackground. Meanwhile if anybody find something for transparency in gradient background.

-----------------------------------------------------------------------------------
Please mark posts as solved if you found a solution. Press the kudos button to thank the user who helped you.
Please use plain text.