Forum /
Sencha Touch 2.x Forums /
Sencha Touch 2.x: Q&A /
Unanswered: Problem transition between view ???
Unanswered: Problem transition between view ???
Hi,
I'm trying to switch from view to another view.
My principal view is a tab panel with tabbar :
Ext.Loader.setConfig({
enabled: true
});
Ext.application({
viewport: {
layout: {
type: 'fit'
},
autoMaximize: true
},
models: [
'AujourdhuiList',
'CategoryList'
],
stores: [
'AujourdhuiListStore'
],
views: [
'MyTabPanel',
'ListContainer',
'PanelDetailAujourdhui'
],
name: 'Coze',
controllers: [
'AujourdhuiList',
'CategoryList'
],
launch: function() {
Ext.create('Coze.view.MyTabPanel', {fullscreen: true});
}
});
In the first item of my tab bar , i've a toolbar, a carousel and a list.
When i touch an item of my list, i would like to switch to my PanelDetailAujourdhui view.
I tried this :
details = Ext.create('Coze.view.PanelDetailAujourdhui', {
layout:'card',
fullscreen:'true'
});
Ext.Viewport.setActiveItem(details);
However, the toolbar and the carousel stay visible on the screen, i don't know why ?
In addition, i would like to switch the view with pop animation, is it possible ?
Thanks in advance,
Nos
In addition, i don't want on my second view the toolbar, the carousel , the tab bar of my first view.
How ????
I found a solution.
I created a view with panel named 'Main' with my first view and my second with a layout to card (with a pop transition)
In my app.js, i created my 'Main' view in launch function with :
MyApp.main = Ext.create('MyApp.view.Main', {fullscreen: true});
In my Main.js, i set my config with :
config: {
id: 'main',
layout: {
animation: 'pop',
type: 'card'
},
items: [
{
//my first view
},
{
//my second view
}
]
And when i touch an element of my list element, i called :
Coze.main.setActiveItem(1);
And it works perfectly
Best regards,
Nos
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us