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
New Contributor
Posts: 5
Registered: ‎02-18-2011
My Device: Not Specified

Has anyone created an accordion panel style field/manager?

Accordion panel, Expandable Panel, Outlook style Nav Panel, or whatever you want to call it....

 

I've been searching all over and found many people looking for functionality similar to what I'm trying to achieve, but the consensus seems to be that there's just no way to do it with the built in API's.  I'm sure it's possible (and seems like it would be useful to a lot of people), to create a custom version.

 

Before I start coding from scratch, I just figured I'd check and see if anyone has already created one and wouldn't mind sharing it with the community?  :smileyhappy:  


So just to clarify, the exact functionality I was looking to achieve would look/function like a TreeField that could have parents of 1 row height, and children of another.  And it would still be collapsible/expandable.  I know this is just not possible with the existing TreeField, so I'm looking for the best alternative.

 

In one very closely related thread, peter_strange helped to create something that looked like what I'm looking for, but just without the collapsibility of the sections.

http://supportforums.blackberry.com/t5/Java-Development/Complex-ListField/td-p/233472/page/2

 

I was thinking this could be made a bit more generic by having each label/parent catch the click/touch event and have it show/hide a child 'panel' that could be of any height, and could also manage any other field types.  So within that panel, you could have a list of the objects in that category. And when the parent is collapsed, the rest of the sibling nodes are moved up correctly (just like the TreeField does).

 

It would be great to get something like this neatly (and efficiently) wrapped into a single custom field class.  It would obviously be easier if someone has already worked out some of the kinks in something like this.  If no one has done this, I welcome any thoughts/suggestions about doing it in the best/most efficient way.  Would extending TreeField be the best place to start in order to inherit as much of that functionality as possible?

 

 

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: Has anyone created an accordion panel style field/manager?

[ Edited ]

I think I have something similar to what you are looking for, but it is built on a custom field/manager framework. PM me and I'll send you a copy of the application that currently uses it for you to look and see.

 

Also, if you are looking for a field like the messages app (also mentioned in that thread), I have a custom field for that as well in an application that I am working on.

Developer
Posts: 132
Registered: ‎10-25-2011
My Device: Tour 9630

Re: Has anyone created an accordion panel style field/manager?

Hello and good day ,

Please if you have that component , i would want it badly , lol , thanks.