Sunday 15 May 2011

javascript - Sencha Touch 2.1: How to create/destroy tab content to increase performance? -


I found a tab panel in my viewport with 4 tabs; Is it possible to keep tabs on their own (to tap the 'button'), but what to do / remove the content / dom?

I'm looking at some tabs. RemovesContent () and Tab.createContent (), I think ...

I tried:

  activitemchange: function (component, value, old value, eOpts) {Ext.Viewport.remove (oldtime, true); }   

Whatever is not doing ...

This removes everything:

  activitemchange: function ( Component, value, oldview, EOpts) {Ext.Viewport.remove (Ext.Viewport.getActiveItem (), true); }   

I found the work that was removed:

  oldValue.removeInnerAt (0);   

But what is the 'opposite' of it, that is, how can I set the contents of a tab?

  var myContent = Ext.create ('MyApp.view .My thoughts'); // and now?    

Senior Forum Manager Mitchell Simons created an extension for it. This can be found on their Github page:

Tabs will be removed and cached.

Edit: In your current state, Ux.tab.OptimizedTab , which is incorrect. Lib only makes some changes in some ways (Lib Ext.tab.Panel does not extend in. Extra.tab.Panel. By example, Michele can see that It is expanding Ext.tab.Panel and type the default on optimized-tab .

  Ext.define ('MyApp .view.Main ', extension:' Ext.tab.Panel ', xtype:' main ', Required: [' Ext.TitleBar ',' Ext.Video ',' Ux.tab.OptimizedTab '], Configure : {TabBarPosition: 'bottom', defaultType: 'optimized-tab', item: {...}}}   

Note that you have changed the Lib Classname, In my opinion there is a lack of respect and after this you have given it wrong name and kept it in the wrong folder. (The name given by you is Crossfit.view.OptimizedTab but it is also visible at all

I would like to give you some compliment on your good architecture of the app, I have not seen many people who understand touch architecture but you, Michelle and I have some :)

No comments:

Post a Comment