BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-06-2008, 01:01 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: Carrier
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Need help with transparency

Please Login to Remove!

Hi guys,

I need your help regarding with this one :

I've created an application running on background that pushes a screen into foreground. My only problem is that (looking on the image attached) i can't figure out how to make the white background into transparent so that only the red box is displayed. Notice also the corners of the red box that it has a rounded corners. I want also to make that part transparent.

Is there any possibility that i could achieve that?

Thanks guys, I really appreciate if you can help me with this one..
Attached Images
File Type: png 8120.PNG (23.2 KB, 20 views)
Offline  
Old 11-06-2008, 05:30 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 8130
PIN: N/A
Carrier: US Cellular
Posts: 82
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is that a single bitmap? Or are you using drawing primitives to draw each part yourself?

If it is a bitmap then you need to have an alpha channel in your source image (and thus use an image format that supports it, like PNG), and create the appropriate mask so the white area is transparent.

If you are using drawing primitives then call setGlobalAlpha with the level of transparency you want (0 transparent to 255 opaque) before you draw the white area.

Last edited by Dan East : 11-06-2008 at 05:31 AM.
Offline  
Old 11-06-2008, 08:52 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: Carrier
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply.

No it's not a single bitmap. And I'm not using drawing primitives to draw each part myself. The only image i am using is the red box (PNG format). I used the Bitmap.getBitmapResource("Image01.png") to display that red box on my screen which is extending the MainScreen. The white background behind the image is from my screen. I used the Ui.getUiEngine().pushGlobalScreen() method to push this screen. I tried this one with PopUpScreen, Dialog, etc.. but same results, it still has that white background.

It's hard for me to explain because I'm a newbie with blackberry development. I hope you're getting what I am saying.. ^^

Thanks again..
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.