1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    62
    Vote Rating
    5
    s.t.a.s is on a distinguished road

      0  

    Default Best practices for smooth android animation

    Hi everyone!
    I'm trying to figure out how to make better animation for Android (on iOS all works as usually fine). For example, I started to use Ext.Animator instead of Ext.Anim and my code is:
    Code:
    this.parent.getScrollable().getScroller().getMomentumEasing().y.setMomentum(
    {
    	acceleration: 0
    });
    Ext.Animator.run({
    	element: itemContainer,
    	duration: 100,
    	easing: 'ease-in',
    	preserveEndState: true,
    	from: {
    		left: this.minX
    	},
    	to: {
    		left: this.maxX
    	},
    	onEnd: function () {
    		this.parent.getScrollable().getScroller().getMomentumEasing().y.setMomentum({
    			acceleration: 30
    		});
    	}
    });
    As a result, I see that animation on Android became better, but anyway is worse then on iOS. And I need your advice what to change, how to work with it?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,412
    Vote Rating
    1103
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    Best practice to smooth android animation is to use iOS

    Don't have too much animating, don't use box shadows, don't do complex animations, switch to iOS
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    580
    Vote Rating
    30
    estesbubba has a spectacular aura about estesbubba has a spectacular aura about

      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Best practice to smooth android animation is to use iOS

    Don't have too much animating, don't use box shadows, don't do complex animations, switch to iOS
    Sadly this is the best answer. I tested a client implementation of our mobile app and it just shines on iOS. I tested on about 10 Android devices, even the latest Samsung phones and tablets, and the experience just wasn't as smooth. A Kindle Fire hacked to run Android 4 was very close to iOS in smoothness.

Thread Participants: 2