10-18-2012 12:31 AM
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?
10-27-2012 01:41 PM
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.
10-29-2012 05:23 AM
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.