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
Developer
Posts: 122
Registered: ‎09-15-2010
My Device: BB - 9800

Displaying images in a carousel view

Hi all,

 

                      In my project I have to display images in a carousel view, some thing like the images should b displayed as an oscillation of a pendulum ( observe the picture below), using the touch screen or track pad moment, next image should be displayed. I gone through the link below and its really useful, Using that, I'm able to rotate the image using the image center, but I want to oscillate  the image like a pendulum. For that I need to change the origin of the image. Can any one give guidance on how to change the origin of the image, so that I can achieve what I wanted. 

 

http://supportforums.blackberry.com/t5/Java-Development/Rotate-and-scale-bitmaps/ta-p/492524

 

 

 

 

Screen shot 2011-01-03 at 1.28.12 PM.png  

 

 

 

send any sample code snippets or any articles, Any help in this regards would b highly appreciated....

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Displaying images in a carousel view

I don't know why your image disappeared from your post.

 

You can do a two step process: rotate, translate. But you would have to figure out the translated position yourself.

 

Another option is more resource intensive but easier: Have a Bitmap that is the diameter of the "pendulum" and draw the image onto the bigger image. Rotate the bigger image and draw the bigger image on the screen.

 

There are probably other methods of doing it but those two are what I cam up with off the top of my head.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Highlighted
Developer
Posts: 122
Registered: ‎09-15-2010
My Device: BB - 9800

Re: Displaying images in a carousel view

hi there,

 

        thanks for ur reply, and it is helpful and I'm working on the same.........

 

regards,

saran