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
webmasterpdx
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: How to create a partial screen?

Here is how you can make your PopupScreen transparent or alpha.....

 

 

// PopupScreen activated here pushGlobalScreen(new myScreen(), 1, 0); ... ... // In the myScreen Constructor super(new VerticalScreenManager, Field.FOCUSABLE); ... ... // Finally create a background and set it in myScreen. Note that this // must be a function in the myScreen class as it's it's setBackground() // function that must be called. NOT the VerticalScreenManager's. Background newback = BackgroundFactory.createSolidTransparentBackground(Color.BLUE, 50); setBackground(newback); ... ...

 

In the example above, the alpha is set to low (0 is transparent, while 255 is opaque) with a color Blue.

-Donald

 

 

Please use plain text.
Developer
simon_hain
Posts: 16,004
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: How to create a partial screen?

the good news is that you can create a partial screen. you have to push it globally using Ui.getUiEngine instead of UiApplication. Use PopupScreen to customize it to your needs.

the bad news is that there is no way to find the size of the native rim titlebar programatically. you don't have any information about the installed theme either. that is the reason why applications implement their own title bar (if they have any).
----------------------------------------------------------
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
myraddin
Posts: 409
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to create a partial screen?

Mimicking native titlebar is very hard - if not impossible to achieve.

As I said there are many drawbacks to every hack solution you try.

 

I really think you should not go that path. I've tried and spent many hours on geting an instable and incomplete solutions with many restrictions.

 

I suggest you try to create your own title bar. 

 

We just need to be patient until RIM gives us more freedom regarding theme resources access, (oh wouldn't it be nice if RIM would provide us with it's title bar - iPhone has something similar... but, that's another topic)

 

Regarding the size....

It is true (as simon_hain said) that you cannot access the size programatically.

One of my apps was also 'native screen dependant' and the solution was to measure the positions/sizes on every targeted device separately (no universal solution :smileysad: )

 

You can create a screen with a transparent background and draw a semi-transparent rectangle on it. 

Capture keys/trackball to enable moving of that rectangle.

Now push that screen using pushGlobal and set the rectangle's position, height and widht using keypad/trackball, and, of course, trace the position when you are satisfied. 

 

You don't need every device in your hand. To my experience, display coordinates were exactly the same in simulator and in every device I tried the app on.

 

 



"Listen carefully, I shall say this only once"
Please use plain text.
Developer
yako
Posts: 43
Registered: ‎01-20-2009
My Device: Not Specified

Re: How to create a partial screen?

Thank you for all your replies. It certainly have been very helpful.

I now know that I should explore other options instead.
Please use plain text.
New Developer
Alibek
Posts: 12
Registered: ‎06-09-2009
My Device: Not Specified

Re: How to create a partial screen?

Hi !

 

sorry to disturb everyone. I just came accross this. I am also having _exactly_ same problem. and I am also trying to achieve _exactly_ same things as Yako (as drawn in his picture).

 

does anyone come up with any solution?   

 

I tried popup screen, full screen, transparent backgrounds, alphas, etc. No luck. I am always getting the upper part of screen (where you have battery indicator, signal power indicators, etc.) covered with white color. Just cannot work around.

 

please, if someone knows any hints, let us know.

 

Al.

Please use plain text.
Developer
webmasterpdx
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: How to create a partial screen?

From my post earlier, you can make your popup transparent. There is a JDE 5.0 that is coming out soon and it's very exciting. There are lots of new stuff that they didn't have before....e.g. you can focus the camera and control the light (something I wanted a year ago). There might be more in there to do what you want.

 

-D

Please use plain text.