1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    RobbeR is on a distinguished road

      0  

    Default setActiveItem animation doesnt work

    setActiveItem animation doesnt work


    Hello,

    In Sencha Touch 2, I use this code snippet in my controller:


    this.control({
    '#test_button': {
    tap: function () {
    var root_c = Ext.getCmp("main_container");
    root_c.setActiveItem(
    1, {type:'slide', direction: 'left'}
    );
    }
    }
    });

    It works nicely, but it switches only the "default way", not the "sliding way". Can anyone help, why?Thanks in advance,
    R

    Edited: Sorry about the bad code formatting

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    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

      1  

    Default


    Check out animateActiveItem instead of setActiveItem. setActiveItem in ST2 doesn't support animation.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    RobbeR is on a distinguished road

      0  

    Default


    It works like a charm
    Thank you for your help!

    R

  4. #4
    Sencha User AkashSaikia's Avatar
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    33
    Vote Rating
    0
    AkashSaikia is on a distinguished road

      0  

    Default


    I had the same problem, but solved now because of the animateActiveItem Thanks.

Thread Participants: 2

Tags for this Thread