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
Highlighted
Contributor
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Listfield with group header

Dear All,

 

I need to show following content in listfield like the attached scrheenshot...

 

----MOVIE NAME 1-----

Theatre Name-1  Show Timing : 12:30 PM

Theatre Name-2  Show Timing : 13:20 PM

Theatre Name-3  Show Timing : 14:30 PM

----MOVIE NAME 2-----

Theatre Name-1  Show Timing : 12:30 PM

Theatre Name-2  Show Timing : 13:20 PM

Theatre Name-3  Show Timing : 14:30 PM

----MOVIE NAME 3-----

Theatre Name-1  Show Timing : 12:30 PM

Theatre Name-2  Show Timing : 13:20 PM

Theatre Name-3  Show Timing : 14:30 PM

 

In the above list MOVIE NAME is group header, similar to this FB list..

 

http://t2.gstatic.com/images?q=tbn:ANd9GcT1SIDvLOPktxJtWNk2uEP9J3uDRLhU1mpxW0adrlQ-G-piH0XJxA

 

Please help me out ...thanks in advance..

liste

Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Listfield with group header

Very easy to do via custom layouts. I think they added a component to do this in 6.0, but I don't think it's very functional or well documented. "sticky headers" is the technical term the documentation uses... lol
Contributor
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Re: Listfield with group header

You mean, custom layout which will be embedded in listfield rows?, if yes then how to have different row height for group headers  rows and content rows. 

Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Listfield with group header

Nope. Not using listfield at all. Custom layout meaning that the list is a manager and each row/header is a child manager of the "list".
Contributor
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Re: Listfield with group header

you mean array of LayoutManagers?

 

Header 1 (Horizontal FieldManagers 1)

item-1 (Listfield 1)

item-2 

item-3 

Header 2 (Horizontal FieldManagers 2)

item-1 (Listfield 2)

item-2 

item-3 

 

like this please advise?

Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Listfield with group header

[ Edited ]

Yes something like that.

 

Also check out this doc from developer conference: http://www.blackberrydevcon.com/docs/devcon_dev28.pdf Depending on how much functionality you need, you may be able to get away with using RIMs pre-made list fields with sticky headers. This is only 6.0+ though.

Contributor
Posts: 14
Registered: ‎08-21-2011
My Device: Bold
My Carrier: Airtel

Re: Listfield with group header

finally its done!...need to tweek the fonts for better look.. thanks buddy..

 

List

Developer
Posts: 17,019
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Listfield with group header

looks good.

we created an own class that contains a labelfield and an objectlistfield to achieve something similar (but for 4.2.1 up)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter