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
AnuShamaiah
Posts: 2
Registered: ‎10-18-2012
My Device: Strom 9980

Carousel inBlackberry

How to create round carousel in Blackberry using java coding?It must contain rotation navigation and when any menu is checked it much respond based on the activity provide for that menu?

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Carousel inBlackberry

There is no right way to do this, it depends on what you are trying to achieve.

 

For example I have created horizontal carousels by just adding 'Buttons' to a HorizontalFieldManager which was scrollable. 

 

Anyway describe what you are trying to achieve in a little more detail and we might be able to help more. 

New Contributor
AnuShamaiah
Posts: 2
Registered: ‎10-18-2012
My Device: Strom 9980

Re: Carousel inBlackberry

I m looking for a carousal as shown in this link http://www.pixelzdesign.com/blog_view.php?id=55

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Carousel in Blackberry

That doesn't help as much as it could, which of them are you trying for?

 

I assume you are looking for a horizontally scrolling carousel.  The following is just the way I would do it and my opinion.  Others will have different opinions and options, so hopefully you will get some additional comments. 

 

In general, with a Horizontal carousel, you will add a scrollable HorizontalFieldManager to the Banner or Title area (setBanner or setTitle when using a MainScreen).  This VFM will be scrollable.  You will populate this with buttons and have a listener in the MainScreen that detects clicks and potentially focus for each of these buttons.  The device will automatically scroll this as the user swipes this or uses the trackpad. 

 

Call this scrollable HFM, the ButtonManager. 

 

To add the 'position' indicator along the bottom (say a series of dots) you will put the ButtonManager within another  Manager (call this the CarouselManager) and display the dots along the bottom using this.  You could add another HFM (the DotsManager) to the CarouselManager and add the dots as bitmapField to the DotsManager,  Then the CarouselManager will listen for scroll position changes in the ButtonManager and use the scroll position to set the bitmap for the appropriate 'dot' correctly (and all others off). 

 

This is just the high level overview, and there are a few tricks on the way and many many other ways of doing this.  But if you start with this approach you will learn everything you need to know to make an effective carousel.