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
New Contributor
Posts: 9
Registered: ‎03-12-2010
My Device: BlackBerry 8800
My Carrier: Development

need help for making popup screen to cover entire display..

Hi,

 

I am a total newbie to Blackberry development.  I need to create a static processing message screen big enough to cover the entire display.

 

My attempts :

 

  •     I created a class that extends PopupScreen and i over rode the sublayout method with setposition(0,0) and setExtent(Display.getWidth(), Display.getHeight()). 

                      The issue with this is..  the screen so created doesn't fit in properly.  PopupScreens have a border and shading which starts from 0,0 and the right & bottom border are not displayed as it spans more then the display width.

 

  • Next over rode the sublayout method for the delegate manager.

                      But then I couldn't position my label field in the center of the screen. Also, It appeared fine on small screen display (8800 simulator) but in bigger screens it left almost 30Px width on right and bottom side and did not cover the screen.

 

  • Tried LabelField.HCENTER ,LabelField.VCENTER , LabelField.USE_ALL_WIDTH , LabelField.USE_ALL_HEIGHT

                    This constants also could not make the screen cover entire display.

 

Any help would be greatly appreciated.

 

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: need help for making popup screen to cover entire display..

Use a FullScreen object and make your own PopupScreen.

New Contributor
Posts: 9
Registered: ‎03-12-2010
My Device: BlackBerry 8800
My Carrier: Development

Re: need help for making popup screen to cover entire display..

But  will the FullScreen object  be deployed using pushModalScreen function? I am using this function to suspend my main thread and allow processing in other. Hence I chose the popupscreen class. 

 

Also before the new thread starts, I am popping off a few screen from the stack and loading new ones. While the new ones get loaded, the below screen is visible below the processing PopupScreen. Hence I wanted to make my PopupScreen cover the entire display in order to hide the below screen which is topmost on the display stack.

 

Other functionalities are almost in place and workign fine. All I need is to hide the screen below PopUpScreen and show a Processing message. I am unalbe to hide it for now.

 

any idea how i can go about it?

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: need help for making popup screen to cover entire display..

[ Edited ]

You can push any screen object as a modal screen. All of my custom screen classes override FullScreen so that I can control the layout and position and I have no problems.

New Contributor
Posts: 9
Registered: ‎03-12-2010
My Device: BlackBerry 8800
My Carrier: Development

Re: need help for making popup screen to cover entire display..

Thanks.. I'll definately try that..  also it would be great if you could tell me how I can position my label field in the center of the screen.

 

If I inherit FullScreen Class, can I assume that it will by default cover the entire display ? If It does, all i need is then to set my label field in exact center of the screen.  It would be great if you could tell me how to place a lable field and also say a Horizontal manager.

 

I am planning to add an animated GIF along with the Label. The GIF works fine for me but again neither I can set label field at the center nor the horizontal manager to hold GIF and label together.

 

Can you help me with this?

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: need help for making popup screen to cover entire display..

It will take up the full display as long as the extent is the full heigt and width. All of my class are custom ones extended from the RIM api, so I could not tell you exactly how to use the stock classes. I specify the position I want all my fields to display at during creation and use this inside a custom manager to position them.

New Contributor
Posts: 9
Registered: ‎03-12-2010
My Device: BlackBerry 8800
My Carrier: Development

Re: need help for making popup screen to cover entire display..

Thanks CMY. Will Surely try this and let you know about it. Smiley Happy