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
Posts: 43
Registered: ‎01-20-2009
My Device: Not Specified

How to create a partial screen?

[ Edited ]

Hi, I'm trying to create a screen that is like that Call Log screen. Where the clock, battery, network etc remains at the top of the screen. What APIs should I be looking achieve the same effect?

I've tried looking in dialogs/MainScreen/Fullscreen but nothing obvious that I've found, I'm still not very familiar with the terminologies that BB uses.

 

Thanks in advance. Smiley Happy

Message Edited by yako on 01-20-2009 06:37 PM
Developer
Posts: 46
Registered: ‎10-29-2008
My Device: 9700

Re: How to create a partial screen?

I think you want a screen that contains a bunch of layout managers.   Perhaps net.rim.device.api.ui.container.HorizontalFieldManager
Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Re: How to create a partial screen?

As far as my experience says, I could not set partial screens over a single screen.. rather setting of diffrent layouts for different screens has been beneficial.. Try and Use different layouts like HorizontalFieldManager, VerticalFieldManager, FlowFieldManager and DialogFieldManager. For every screen u can set the title for that screen. Take fields like textbox or labelsetc that reflect time, date etc and represent it as the title for that screen... This is the best way to do it...Try it out...
Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Highlighted
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to create a partial screen?

Yes it is doable.

 

You just need to push a 'special' screen with the following method overridden :

 

public void sublayout(int width, int height)
{
super.sublayout(width, height);
setExtent(_EXTENT_WIDTH, _EXTENT_HEIGHT);
setPosition(_EXTENT_POSITION_X, _EXTENT_POSITION_Y);
}

 

protected void applyTheme()
{
}

 

Of course, you shoud set extent and position variables to suit your needs.


(in my case this screen is a child of MainScreen, and it is pushed from a background app via pushGlobal

 

 

 



"Listen carefully, I shall say this only once"
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to create a partial screen?

I forgot to mention,

 

this solution will give you the posibility to create a 'non full' screen.
That will allow any background screens to be visible.

Te idea was to lower your screen so that the home screen's 'widgets' are visible even when the user is using your app.

The drawback is that this approach will also show any other screen maybe present in the background. There is no guarantee that there is no other UI app running. So in some cases you will not see the clock, date, radio status, etc., but a phone log (for instance).



"Listen carefully, I shall say this only once"
Developer
Posts: 16,986
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to create a partial screen?

i understand the question differently. if you want to show battery level etc on top of the screen you can use the method setTitle in the mainscreen class.
See
http://www.jonathanhfisher.co.uk/b2/?p=19
for an example (which is also a good starting point for any customzation).

you can also divide your screen using VerticalFieldManagers. In fact it would be a good idea to have only a single MainScreen with a HeaderField in its title area and change the managers used below 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
Developer
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to create a partial screen?

(Yes you are right simon_hain.)

 

Upon reviewing the question, I think you are searching for an API to do something like simon_hain's posted link proposed.

AFAIK there is (unfortunately) no native API for this. 

I too would be very happy if I could use the native status ribbon but it is an internal object/class Smiley Sad

 

So if you want to mimic the device theme, you are in bad luck. Otherwise, use the HeaderField apprach.

 

(simon_hain: thanks for the link)



"Listen carefully, I shall say this only once"
Developer
Posts: 100
Registered: ‎01-08-2009
My Device: Not Specified

Camera Implementation in jde3.0

Hi all, I have seen a CameraDemo version for jde6.0 that runs well on the same... However I want to implement camera

on jde3.0... I tries to use the same code in jde3.0... I can only use RIM API's and not the microedition ones ....

CAN I IMPLEMENT THIS CODE OR SOME OTHER CODE IN JDE3.0 THAT CUD HELP ME IMPLEMENT  CAMERADEMO IN JDE3.0 ON ECLIPSE....

Regards
Akash Saxena
Blackberry Developer,
Wirkle.
Developer
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: How to create a partial screen?

Maybe I'm misunderstanding your problem here, but I've created partial screens over the background by using a PopupScreen. It can be any rectangular size and position. You can make it modal if you want too....though I haven't tried that.

 

Good Luck

-Donald

Developer
Posts: 43
Registered: ‎01-20-2009
My Device: Not Specified

Re: How to create a partial screen?

First off. Sorry for the confusion and Thank you for the replies.

I'll try and further clarify what I am trying to achieve. However, myraddin's first interpretation was pretty accurate and I am trying to get the effect right now.

 

Objective

 

As you can see the screen on the left is the default home screen. Nothing special there. Upon clicking the call log (red circle) I am brought to the screen shown on the right. As you can see the top bit of the screen is preserved and the user can see those information without closing down the call log. Question: Is the call log screen push by using pushGlobal?

 

Notice as denoted by "2" that there is an alpha blended white gradient applied. I believe this is done by the theme/OS and would like to preserve that if possible. I have notice that the gradient comes and go with different themes.

However if I have to hack up of screen to achieve this effect. I would have to setPosition(x, y) the screen, then I would like to get the Y offset value to set position. Denoted by "1". This is so that I can have the same effect accross different device

 

I guess my hope is that there is an API for partial screen just like how there is MainScreen for a standard Look and feel for fullscreen applications.

 

Other Issues:

Obviously I'm not very familiar with BB so it's been slow progress for me. So far I've been trying to achieve the effect by using PopupScreen. However, because I am pushing the screen as the application starts up, I am given a white background with my popup positioned to where I want it. I probably would've been quite happy with a transparent bg Smiley Happy

 

I am also trying to use pushGlobal as myraddin has suggested, but I'm getting exception. I bet that's just my poor understanding of the system.