BlackBerryForums.com : Your Number One BlackBerry Community  
   

»Sponsored Links



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
BBPsy Offline
New Member
 
BBPsy's Avatar
 
Posts: 5
Join Date: Sep 2007
Model: 7520
PIN: N/A
Carrier: Globe
Question Help in dividing mainScreen into two... - 06-30-2008, 08:32 PM

Hi guys,

I need your help on how to divide the main screen into 2 equal parts with separator field at the middle.

The top layer will contain a listField while the bottom will contain a label.

Please help...Thanks in advance


---------------------------
Regards,
BBPsy
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
bdowling Offline
Thumbs Must Hurt
 
Posts: 158
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Default 07-01-2008, 12:48 AM

You need to create a custom manager class that has height Display.getHeight() / 2
   
Reply With Quote
  (#3 (permalink)) Old
Ivanov Offline
Thumbs Must Hurt
 
Posts: 119
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Default 07-01-2008, 01:31 AM

create two VerticalFieldManagers with NO_VERTICAL_SCROLL (your listfield is scrollable), override in the first one (top)

Code:
            protected void sublayout(int maxWidth, int maxHeight)
            {
                super.sublayout(maxWidth, maxHeight);
                setExtent(maxWidth, maxHeight/2);
            }
add a separator

if you want the second manager (bottom) to fill the rest of the screen override sublayout with
Code:
            protected void sublayout(int maxWidth, int maxHeight)
            {
                super.sublayout(maxWidth, maxHeight);
                setExtent(maxWidth, maxHeight);
            }
add them to your main screen

Last edited by Ivanov : 07-01-2008 at 01:34 AM.
   
Reply With Quote
  (#4 (permalink)) Old
BBPsy Offline
New Member
 
BBPsy's Avatar
 
Posts: 5
Join Date: Sep 2007
Model: 7520
PIN: N/A
Carrier: Globe
Default 07-03-2008, 04:45 AM

Hi Ivanov and bdowling...Thank you very much for the info...
I'll try it on my codes.


---------------------------
Regards,
BBPsy
   
Reply With Quote
Reply


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-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1