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:
MGWT.applySettings(MGWTSettings.getAppSetting());

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

AnimationHelper animationHelper = new AnimationHelper();
RootPanel.get().add(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.setText("Animate");

button.addTapHandler(new TapHandler() {

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

 }
});

layoutPanel.add(button);

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.

63 comments:

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

    ReplyDelete
    Replies
    1. Great Article Cyber Security Projects projects for cse Networking Security Projects JavaScript Training in Chennai JavaScript Training in Chennai The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
      پویان مختاری - در دیگری - حسین تهی - کجایی - محسن چاوشی - واحدا - آرمین 2afm - تنهام - سیاوش شمس - قهوه قاجار - محسن چاوشی - عشق هیولایی - مهراب و ایمان نولایف - هرزه - ساشا سبحانی - سلام علیکم - ایمانمون - فاصله - مهدی احمدوند - ماشین زمان

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

    ReplyDelete
  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
    Speciaali

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

    ReplyDelete
  5. 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

    ReplyDelete
  6. 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 

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

    ReplyDelete
  8. 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.
    webdesign

    ReplyDelete
  9. I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.
    Web Design Singapore

    ReplyDelete
  10. Always make a request to converse with their customers to perceive what their experience was working with the developer. kttp.com

    ReplyDelete
  11. Marking is one of the routes in which we construct a relationship of trust with a client and hold them returning for business as usual. peterborough web design

    ReplyDelete
  12. That is to say, it's like some other craftsman's style; you can detect their past works in view of the general format, shading plan, and general visual appearance of the locales. online marketing bahrain

    ReplyDelete
  13. Ensure you comprehend what you are getting for your cash and ensure you get it in composing! I have a 9-page web website configuration get that I utilize each and every time I outline another web webpage.https://edkentmedia.com/website-design-development/

    ReplyDelete
  14. Enter Web 2.0 and more conventional showcasing roads wandering into the commercial center, and innovative web design companies have come into the amusement. Website Design San Diego

    ReplyDelete
  15. Regardless of how you choose to learn web design and how you choose to enter the field, a few people can possibly move toward becoming web designers than others.
    SEO ΤΩΡΑ

    ReplyDelete
  16. 192.168.1.254 Now you can control your Netgear router and configure it according to your needs. There are tons of things you can do with your router settings which can give greater control and optimization for your use-case.

    ReplyDelete
  17. Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing...
    mason soiza

    ReplyDelete
  18. Therefore, when hoping to enlist an imaginative web design organization, you ought to dependably make certain to investigate their activity, most legitimate organizations won't worry about you asking a couple of inquiries. web design

    ReplyDelete
  19. While this would be classed as an inventive web design company, regularly their imaginative web design's wouldn't be effectively changed over from a design into code,web design nyc

    ReplyDelete
  20. The important elements of your website can be pulled up on a smart phone and appear as a fully functional version of the original, complete with all the utility you'd offer to customers on a laptop or desktop computer.darwin design agency

    ReplyDelete
  21. The Web lets us market our services and products any place in the Earth, but to be able to actually earn a sale, we have to set a relationship that generates a sufficient amount of trust, confidence, loyalty and passion. brand reputation

    ReplyDelete
  22. The most exceedingly awful thing you can do to get more Instagram devotees is to unpredictably post content buy real ig followers. In case you're sufficiently fortunate to get clients tailing you at the outset, the exact opposite thing you need to do is influence them to overlook they tailed you in any case.

    ReplyDelete
  23. It's constantly desirable over decide on an incredible web design organization that involves committed and prepared representatives. Webdesign

    ReplyDelete
  24. Webdesigner waar u een professionele en betaalbare website kan laten maken? De nr. 1 webdesigner in Limburg, Antwerpen en Vlaams-Brabant voor SEO websites. Webdesigner

    ReplyDelete
  25. All things considered,website developer in gurgaon you are maintaining a business so you are going to require a website that sells clients.

    ReplyDelete
  26. Database web design can incorporate https://www.dbdesigner.net straightforward designs which can be executed to the current framework at the association and not disturb any current capacity.

    ReplyDelete
  27. The information you have posted is very useful. Thanks for sharing this valuable article. website development

    ReplyDelete
  28. I have just read your post at the suggestion of my friend. Keep post.

    Webdesign Agency Gent

    ReplyDelete
  29. Reasonable web configuration is easy to find in any capacity. The most reasonable web configuration is critical to get the compelling impact on the online segment. web designer nuneaton

    ReplyDelete
  30. This comment has been removed by the author.

    ReplyDelete
  31. Some long-term SEO's are presently taking a gander at the 10,000 foot view and working with ease of use examiners.Webdesign

    ReplyDelete
  32. Albeit structuring tables might be simple, the support is extreme. Most screen perusers think that its hard to comprehend tables as they should peruse it in the succession showed in HTML,premium wordpress blog themes

    ReplyDelete
  33. In the event that one's business doesn't have SEO Internet advertising systems, the individual will require help from SEO specialists. SEO

    ReplyDelete

  34. The conduct of the client, when the individual interfaces with a website, is like a client cooperating with a store.Website designing in Dubai

    ReplyDelete
  35. The information you have posted is very useful for online dating. The sites you have referred was good. Thanks for sharing.. website development consultant

    ReplyDelete
  36. An accomplished web design organization will have a strong arrangement of web destinations that they have made for different customers. Webdesign

    ReplyDelete
  37. To make a solid brand in the new media time the brand must be offered over to supporters to create among their "companions".smm panel

    ReplyDelete
  38. eCommerce Website Designers who are 100% Australian developers from Website Development Australia. We build high performing eCommerce websites. ecommerce

    ReplyDelete
  39. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. spyfone

    ReplyDelete
  40. Wonderful blog! Do you have any tips and hints for aspiring writers? Because I’m going to start my website soon, but I’m a little lost on everything. Many thanks! www.hotmail.com entrar

    ReplyDelete
  41. Their job is to figure the procedure of the specific video and guarantee that the final product is drawing in and engaging with the goal that individuals will watch and value it.cosplay costume

    ReplyDelete
  42. It is additionally a decent vehicle to show that animation savagery can be utilized to a positive end. manganelo

    ReplyDelete
  43. Notwithstanding, the organization has ensured SEO administrations, where customers don't pay support for that month. Webdesignlab

    ReplyDelete
  44. Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign ! anime cosplay costumes

    ReplyDelete
  45. To make a web webpage or a web presence, one needs to utilize a website design organization. Webdesign Kortessem

    ReplyDelete
  46. It is regularly contrasted with speculative chemistry. Webdesign bureau

    ReplyDelete
  47. The Chandigarh call girls are supposed to be the most charming selections in the whole area whom you would like to avail in for the instances of love.

    Visit Our Website:-
    Chandigarh call girls
    Chandigarh Independent Escorts

    ReplyDelete
  48. Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing...
    Website Development and App Development Course in Gurgaon

    ReplyDelete
  49. They are really nice article shared! I like your content. Thanks for sharing nice information. Digitak Agency In India

    ReplyDelete
  50. I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. cell phone spy

    ReplyDelete
  51. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. Walmart iPhone 13 Deals

    ReplyDelete
  52. On the off chance that you have associations with individuals who support your endeavors, boost those connections and request that they spread the word. discover this info here

    ReplyDelete
  53. Responsive web design has become the go-to solution for businesses who want a user friendly interface and higher customer retention.MavericksMedia

    ReplyDelete
  54. Here are the absolute most significant suggestions on the best way to make this conceivable: image download from instagram

    ReplyDelete
  55. In order to grow and gain new engaging followers in an ever-growing competitive market, you need people to see your content. Nobody wants to be one of the first to follow, or engage with someone new – better known as social proof. https://instamama.net/

    ReplyDelete
  56. I read this post your post so nice and very informative post thanks for sharing this post
    also visit our site smm panel

    ReplyDelete
  57. Hi, Great Blog. The content is useful and informative . Thank You for sharing such a good content. Keep Sharing it. We are an experienced web development and website designing company in Gurgaon. Our teams are expert and ready to do any task. We use the latest technologies and always suggest the best technology to our clients according to their requirements.

    ReplyDelete
  58. Your website analysis will show you which sites are linking to you and the quality of these sites. fightbac org

    ReplyDelete