0

I would like to create a blackberry component which has the following capabilities:

  • Horizontal scrolling of various image fields much like a carousel/springboard interface.
  • Circular dots as indicators for the image that's focused on, located at the bottom.
  • When user swipes or slides the images left or right, the next image that's in the center position should be focused and slide animation should lock the image into position.

I'm able to do a simplified version of this where I have three image placeholders across the screen horizontally. When the user swipes, the images will change (i.e shift left or right, with the focused image in the center).

However, I want to know how I can implement smooth scrolling with momentum, showing the image locking in center when the user scrolls/swipes left or right.

4

1 回答 1

1

您可以尝试使用字段布局动画。事情是同时更新几个字段的布局位置。

否则尝试水平滚动。使用带有图像的自定义 Horizo​​ntalFieldManager 并从代码滚动

无论您想如何做到这一点,您都必须编写一个函数(x 坐标)= f(时间)来获得这种平滑的移动和集中化。甚至可能有几个功能。

祝你好运!

于 2010-08-13T04:40:59.097 回答