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
neoknip
Posts: 38
Registered: ‎10-27-2010
My Device: Blackberry Torch 9800
Accepted Solution

Setting Solid Transparent Background for VerticalFieldManager

I am using BB JDE 6.0

Simulator is also for the same (Blackberry Torch)

My device is Blackberry Torch

 

I have created a two verticalfieldmanager in my screen. (iVFM1, iVFM2)

 

I have set the background of iVFM1 as a bitmap background

i have set the background of iVFM2 as a solidtransparent background (with alpha value 180 , Color value - 0x111111), which is placed in the center of iVFM1.

 

I have added two button fields in iVFM2

Background MainBG = BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource("DriveLinkBG.png"));
Background ActBG = BackgroundFactory.createSolidTransparentBackground(0x111111,180);

iVFM2 = new VerticalFieldManager(VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.USE_ALL_WIDTH);
iVFM2.setBackground(ActBG);

iVFM1.setBackground(MainBG);
iVFM1.add(iVFM2);

 

 

Note : Please find the attachments for the images

 

1) When i open my application. the iVFM2 has a solid background(no transparancy)  with the two buttons (attachment : BeforeFocus.png).

2) when i select the first button the portion around the button becomes transparent (attachment : AfterFirstFocus.png)and

3) when i select the other button the portion around that button becomes transparent too(attachment : AfterSecondFocus.png) [adds with the portion that previously became transparent]

 

How to make the whole iVFM2 transparent when the screen is pushed

 

 

Developer
neoknip
Posts: 38
Registered: ‎10-27-2010
My Device: Blackberry Torch 9800

Re: Setting Solid Transparent Background for VerticalFieldManager

I have found the mistake.

I was using transparent background and a solid border. so the whole background was becoming solid.

Now i changed the border to transparent border by setting alpha value, and its working now.