Saturday, June 16, 2012

using animation helper

This post is part of a series of blogposts that show the usage of  some mgwt / gwt-phonegap components.

If you do not want to use GWT Activities and Places you can not use the AnimatingActivityManager from mgwt. This is why we created AnimationHelper. A simple class that lets you use animations with a very simple API.

1. Setup the viewport for the mobile browser:

2. Instantiate an AnimationHelper and attach it to the RootPanel:

AnimationHelper animationHelper = new AnimationHelper();

3. Instantiate a LayoutPanel and a button. Attach the TapHandler to it and animate to another UI on Tap:
LayoutPanel layoutPanel = new LayoutPanel();
Button button = new Button();

button.addTapHandler(new TapHandler() {

 public void onTap(TapEvent event) {
  //build second ui
  LayoutPanel layoutPanel = new LayoutPanel();
  Button button = new Button();
  animationHelper.goTo(layoutPanel, Animation.FLIP);



4. Animate to the created UI:
animationHelper.goTo(layoutPanel, Animation.SLIDE);

A complete example can be found here. If you want to see the mgwt animation in action take a look at the showcase.


  1. This comment has been removed by a blog administrator.

  2. A simple class that lets you use animations with a very simple API.web design tutorials

  3. Wow, happy to see this awesome post. I hope this think help any newbie for their awesome work. By the way thanks for share this awesomeness from

  4. Importance of education has been reprised over by scholars, thinkers, social activists, teachers, leaders and every other being. Ancient philosophers like Aristotle too emphasized on importance of mass education for better governance as better thinking and learned community can make a better living in the future. "Education is the most powerful weapon which you can use to change the world." ― Nelson Mandela Nothing can better emphasize on importance of education than the words mentioned above. All great leaders of all time had focused on educating the society in order to achieve greater goals. A society that can think clearly and enjoys free dissemination of information can only bring positive changes that will lead us to sustainable lifestyle.

  5. Thanks. That was useful post. I also encourage you to learn more about google apps for education.

  6. Our programmers, developers and designers are experts in using the software development tools that support in building innovative, interactive and world-class apps. who sent me message on sarahah

  7. Much obliged to you a pack for imparting this to every one of us you really acknowledge what you are discussing! Bookmarked. If it's not too much trouble likewise look for guidance from my site =). We could have a hyperlink change contract between us! web design 

  8. As I read the blog I felt a pull on the heartstrings.
    web design company

  9. Truly decent and intriguing post. I was searching for this sort of data and appreciated perusing this one. Continue posting. A debt of gratitude is in order for sharing.