BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-01-2008, 11:35 AM   #1 (permalink)
New Member
 
Join Date: Oct 2007
Model: 8100
PIN: N/A
Carrier: Orange
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Customised VerticalFieldManagers with padding

Please Login to Remove!

Iím trying to create a UI similar to the new 9000 style UI (example image at "img29.picoodle.com/data/img29/3/9/24/f_tasksm_efdfd59.png").

I am using a customised VerticalFieldManager for the outer grey area and a second customised VerticalFieldManager for the inner white boxes. I am using the new BorderFactory class to try and imitate the rounded corners. In order to create the padding between the edge of the screen and the inner boxes I am overriding the sublayout method on the outer VerticalFieldManager.

This code produces the result shown at "img37.picoodle.com/data/img37/3/9/24/f_bank1m_f206f89.png" with the bottom border visible

protected void sublayout(int iWidth, int iHeight)
{
super.sublayout(iWidth, iHeight);

setExtent(iWidth, iHeight);
}

However, in order to add the padding I need to position the inner VerticalFieldManagers myself. The code below shows what I think should be happening (without the extra padding), but it doesnít give me the expected result Ė i.e. the bottom border is not visible (see image at "img26.picoodle.com/data/img26/3/9/24/f_bank2m_f4988d7.png").

protected void sublayout(int iWidth, int iHeight)
{
int iNumFields = getFieldCount();
int iYPos = 0;

for (int i = 0; i < iNumFields; i++)
{
Field fField = this.getField(i);

setPositionChild(fField, 0, iYPos);
layoutChild(fField, iWidth, iHeight);

iYPos = iYPos + fField.getHeight();
}

setExtent(iWidth, iHeight);
}

I have exhausted the forums and Googled this issue to death. Any ideas what I am doing wrong here?
Offline  
Old 10-29-2008, 04:24 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2008
Model: None
PIN: N/A
Carrier: Vodafone
Posts: 34
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, I would be interested to know if you ever figured out a simple way to do this? I am attempting to get a similar look for my application UI and can't seem to get the results I am looking for (e.g. the rounded corner borders that the tasks app has) using BorderFactory and Border.
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.