DANG Fan
DANG Fan

Reputation: 864

How to add an animation when using Ext.Viewport in Sencha Touch 2

Here is my app.js:

Ext.application({
    views: ['SignIn'],

    launch: function() {
        // Initialize the signin view
        Ext.Viewport.add(Ext.create('MyApp.view.SignIn'));
    }
});

In MyApp.view.SignIn, I wanna set another view in the Ext.Viewport, so I just wrote Ext.Viewport.setActiveItem(someview).

It worked well. However, how could I add an animation when doing so?

Upvotes: 1

Views: 2767

Answers (2)

Hardy
Hardy

Reputation: 1539

Try

Ext.Viewport.animateActiveItem({xtype:'panelLogin'}, {type:'slide'});

Upvotes: 2

Thiem Nguyen
Thiem Nguyen

Reputation: 6365

try this:

Ext.Viewport.animateActiveItem(someview)

Upvotes: 3

Related Questions