Sencha touch 2.1学习之Viewport

       Viewport和Panel都是容器,区别Viewport在launch之前就被创建而且默认是全屏的。

      Demo:

                 Ext.application({
                            name:'myApp',
                            launch:function(){
                            var panel=new Ext.Panel({
                           id:'mypanel',
                          style:'color:red',
                           html:'一个简单的事例面板'
        });
                  Ext.Viewport.add(panel);
    }
});

 

你可能感兴趣的:(Sencha touch 2.1学习之Viewport)