Animations

An animation is an illusion generated by showing sequential images in a swift manner. It involves associating several key frames that contain values (such as position and alpha) and the duration (in milliseconds) with a target object to be animated. The frames between the key frames are interpolated frames, which display a position calculated based on an interpolator. A simple animation only requires two key frames: the start frame and the end frame.

The Osp::Ui::Animations namespace provides the ability to create animation-related functionalities for developing rich user interfaces in bada.

For a given duration, a basic animation in bada consists of 3 components:

Figure: Basic animation

Basic animation

All animations are played in an asynchronous mode in a thread different from the application's main thread.

Note
The animation functionality is not guaranteed on the Emulator, unless the graphics hardware of your computer supports OpenGL® 2.1.

Interpolators

An interpolator defines the rate at which an animation changes in the given environment. Interpolators can cause various effects of acceleration in an animation. Samsung bada supports the following interpolators:

Applications can use any of these interpolators based on the speed at which the key values change. For example, when an application uses an ease-in interpolator, the key value starts changing slowly and accelerates with time. An ease-out interpolator causes the key value to start changing normally but decelerates towards the end.

The following figure illustrates how each type of interpolator calculates intermediate frames between the start frame (S) and end frame (E) when the animation is playing:

Figure: Types of interpolators

Types of interpolators

Where to Go Next