[MeeGo-touch-dev] How to customize animations.
Tomas Junnonen
tomas.junnonen at nokia.com
Tue Aug 10 06:04:19 PDT 2010
On 08/06/2010 04:29 AM, ext ÖÇËÉ Åá wrote:
>
> Hi, I have analysis the MTF for 2 weeks.
> In document, it says theme & styling include with custom animations.
> But, I found that animations like page switch animation, screen
> orientation change animation are still hard code in several classes.
> I want to join with animation api development. But, first of all, I need
> the intent of the design. What design want to ?
> Thanks.
The animations are currently stylable (i.e. you can configure all the
animation parameters) but not themable (you can't replace a framework
internal animation with a completely different one).
This is merely the result of work prioritization so far, it is not a
huge job to make the animations themable. We've spent some time already
thinking about it:
- The animation interface should be decoupled from the actual
animation implementation. MPageSwitchAnimation for instance would
consist of merely the virtual interface for setting up and controlling
the animation (new page, old page, direction, etc.). This is easy to do
as it's all internal API to MTF.
- From MPageSwitchAnimation is then derived the concrete
implementation(s) of the animation, something like
MPageSwitchSlideAnimation or MPageSwitchCoolExplosionAnimation. In the
same way as views these could be registered with the system and
therefore new animations could be added by providing a separate library
(for example with the theme).
- To make the animation implementation selectable per theme, the same
pattern of how the widget views are chosen at runtime could be used:
- A new factory method MTheme::animation() (compare to MTheme::view)
for constructing the correct class as declared in the theme.
- In the theme libmeegotouchcore.conf file there would be entries for
the animations to map to abstract animation to the concrete
implementation, using the same syntax as for the views.
Regards,
Tomas
More information about the MeeGo-touch-dev
mailing list