BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-08-2009, 08:59 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2008
Location: india
Model: 8700
PIN: 12345
Carrier: Airtel
Posts: 62
Post Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down How to use 2 List in the same screen using Horizontal Field Manager

Please Login to Remove!

How to use 2 List in the same screen using Horizontal Field Manager, i want to limit the height and width of the list.


Two list must need to shown in Horizontal. How can i do that any example program please provide me..
Offline  
Old 07-11-2009, 08:17 PM   #2 (permalink)
Knows Where the Search Button Is
 
Anidamo's Avatar
 
Join Date: Jun 2009
Location: Miami, FL
Model: 9530
PIN: N/A
Carrier: Verizon
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't quite understand, I think you mean you want to place two listfields side by side? You might have to extend HorizontalManager and position the lists yourself to do that, as that's what I did in one of my apps (though with a VerticalManager instead). At the moment I don't have any sample code, though it shouldn't be too difficult.
Offline  
Old 07-12-2009, 09:05 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2009
Location: CANADA
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 64
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

On top of that you have to override layout and sublayout methods in lists and manager,
if you care about sizes.
Lots of examples here on this forum and everywhere.
Just do the search.

Last edited by koic : 07-12-2009 at 09:06 AM.
Offline  
Old 07-14-2009, 03:55 PM   #4 (permalink)
New Member
 
Join Date: Jul 2009
Model: 9000
PIN: N/A
Carrier: ATT
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Lots of examples here on this forum and everywhere.
Just do the search
Done that, spent the last few days doing that

I am trying to do something similar. I want a few areas of text to stay at the top of the screen while a subview of the listfield takes up the bottom portion (with the ability to scroll the listfield yet still keeping the static text at the top).

Anyone know how I can accomplish this? The documentation is hit or miss on this for me.
Offline  
Old 07-14-2009, 03:57 PM   #5 (permalink)
New Member
 
Join Date: Jul 2009
Model: 9000
PIN: N/A
Carrier: ATT
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was able to get a quasi-result with the following manager:
Code:
 final class CenteredFieldManager extends Manager {  
   CenteredFieldManager(long style)
   {
        super(style);//Manager.VERTICAL_SCROLL
   }
	protected void sublayout(int width, int height) {  
        if (getFieldCount() > 0) {  
             Field centeredField = getField(0);  // get the first (and only) field  
             layoutChild(centeredField, width, Graphics.getScreenHeight() - 100); // set the field's width and height  
			 System.out.println( "Width: " + width + " Height:" + height );
             setPositionChild(centeredField, (width-centeredField.getWidth())/2, 0);  // center the field horizontally  
             setExtent(width, Graphics.getScreenHeight() - 100);  // set the size of this manager to use the entire screen width  
         }  
     }  
 }
Which works visually with regards to keeping the top text static and the list field added to this manager scrolls.. But I can't select the fields in the list that are past the screen. Even when scrolling to them, I can't select them on a touch screen device.
Offline  
Closed Thread


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-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.