BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-16-2009, 06:34 AM   #1 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Red face add(horizontalManager) at the bottom of screen

Please Login to Remove!

I am adding four bitmap fields to a Horizontal Field Manager and using these as buttons/tabs to switch between 4 screens (each bitmap field mapped to one vertical field manager). This is a tabbed layout.

The horizontal manager is then added to mainscreen. The whole thing works fine. But i want the horizontal manager to be added at the bottom of the mainscreen instead of top.

The bitmap fields (tabs) are visible at the top of the screen, is there a way to place them at the bottom of the screen?
Offline  
Old 07-16-2009, 10:17 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You'll need to create your own layout manager that places the tabs at the bottom of the screen.
Offline  
Old 07-16-2009, 10:21 AM   #3 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8300
PIN: N/A
Carrier: VZ
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Doug, can you be more specific? How exactly would you go about doing that?

Ok I found this link (sorry can't post links yet):

h t t p : / / w w w
.blackberry.com/developers/javaknowledge/userInterface/kpa0203190635.shtml

I guess that means that within this custom layout manager, you'll be doing some maff to calculate positions based on screen dimensions and specific fields' heights/widths and pinning them to absolute x/y coordinates?

Last edited by DeveloperDave : 07-16-2009 at 10:42 AM. Reason: found a link worth reading
Offline  
Old 07-16-2009, 11:17 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Yes - you would create a layout manager that calculates the position of the tab control by looking at the height of the title, list field, whatever other controls are in the layout.

That's one way to do it, I'm sure there are others.

The default behavior of VerticalLayout is to stack the controls one on top of the other.
Offline  
Old 07-16-2009, 11:59 AM   #5 (permalink)
New Member
 
Join Date: Jul 2009
Model: 8300
PIN: N/A
Carrier: VZ
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks (Congrats on the 500th post, btw). I guess all you really have to to is 2 things in the custom layout manager; accept the HorizontalFieldManager (the bottom) and whatever manager you want for the top content area. Absolutely position those two managers with respect to each other and then proceed as normal (i.e. throw whatever you want in the content area).
Offline  
Old 07-16-2009, 12:32 PM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Something like that.

We have a couple of custom layouts that we use for a variety of situations like this.

For example:

--------------------
TITLE
--------------------
BODY
(Usually a list)
--------------------
FOOTER (usually a toolbar)
--------------------

The title is positioned at 0, the body right under the title, and the footer positioned at screenheight - toolbarheight.

Of course, the body might be a listfield or it might be another manager - either way, the physical extent of this "field" is set to screenheight - toolbarheight - titleheight.

Last edited by Dougsg38p : 07-16-2009 at 12:37 PM. Reason: typo
Offline  
Old 07-20-2009, 06:33 AM   #7 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks everyone...
This would help...
Offline  
Old 07-29-2009, 09:04 AM   #8 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi shraddha294

setStatus(HorizontalFieldManager).

This is dock the manager to the bottom of the screen.

Thanks
Offline  
Old 08-04-2009, 07:40 AM   #9 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

For anyone who refers the thread later, from all solutions, this worked the best for my problem.
Quote:
Originally Posted by Dougsg38p View Post
You'll need to create your own layout manager that places the tabs at the bottom of the screen.
Extend ur screen's manager with Manager and use it to place elements wherever u like.
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.