Hybrid View

  1. #1
    Touch Premium Member
    Join Date
    Jun 2010
    Posts
    324
    Vote Rating
    2
    profunctional is on a distinguished road

      0  

    Default How do we disable transitions for the Android?

    How do we disable transitions for the Android?


    Is there a global setting to do this? The transitions on the kitchen sink work fine. But our app transitions to panels with form fields and lists. The performance is very choppy when you are transitioning to anything but a blank page.

  2. #2
    Ext User mikeyroy's Avatar
    Join Date
    Jul 2010
    Location
    San Francisco
    Posts
    101
    Vote Rating
    1
    mikeyroy is on a distinguished road

      0  

    Default


    This is what I use now that they re-enabled transition animations for Android:
    Code:
    Ext.TabPanel.override({
        setActiveItem : function(card, animation) {
    		if (Ext.is.Android) {
    			animation = false; 
    		}
            this.layout.setActiveItem(card, animation);
            return this;
        }
    });
    If that doesn't do it for you, you may have properties declaring the animation elsewhere which override the animation setting here. To preserve animations on the iPhone I have the animation declared when I call setActiveItem to switch the cards, so in my case the above code works fine.

  3. #3
    Touch Premium Member
    Join Date
    Jun 2010
    Posts
    324
    Vote Rating
    2
    profunctional is on a distinguished road

      0  

    Default


    Thanks, Im gonna try this. On a side note, why did you disable animation?

    Quote Originally Posted by mikeyroy View Post
    This is what I use now that they re-enabled transition animations for Android:
    Code:
    Ext.TabPanel.override({
        setActiveItem : function(card, animation) {
    		if (Ext.is.Android) {
    			animation = false; 
    		}
            this.layout.setActiveItem(card, animation);
            return this;
        }
    });
    If that doesn't do it for you, you may have properties declaring the animation elsewhere which override the animation setting here. To preserve animations on the iPhone I have the animation declared when I call setActiveItem to switch the cards, so in my case the above code works fine.

  4. #4
    Ext User mikeyroy's Avatar
    Join Date
    Jul 2010
    Location
    San Francisco
    Posts
    101
    Vote Rating
    1
    mikeyroy is on a distinguished road

      0  

    Default


    The animation = false disables the transition when directly calling setActiveItem. I have the same choppiness with the transitions.

  5. #5
    Sencha User
    Join Date
    Jan 2011
    Posts
    8
    Vote Rating
    0
    NetNexus is on a distinguished road

      0  

    Default


    How about:

    Code:
            if (Ext.is.Android) {
                Ext.Anim.override({
                    disableAnimations:true
                });
            }
    right on top in the onReady function of the Ext.setup?

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
    pbjorge is on a distinguished road

      0  

    Default


    Quote Originally Posted by NetNexus View Post
    How about:

    Code:
            if (Ext.is.Android) {
                Ext.Anim.override({
                    disableAnimations:true
                });
            }
    right on top in the onReady function of the Ext.setup?
    I just wanted to comment that this breaks the datepicker.
    http://www.sencha.com/forum/showthre...iding-Ext.Anim

Similar Threads

  1. Overlays with CSS3 transitions
    By dominoedge in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 26 Aug 2010, 2:20 PM
  2. webkit transitions
    By andersjj in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 20 Aug 2010, 9:38 AM
  3. Transitions
    By hazlema in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 16 Feb 2008, 9:17 PM
  4. Animated Transitions in BorderLayout
    By jfaust97 in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jan 2007, 11:33 AM

Thread Participants: 6