PDA

View Full Version : How to replace top toolbar as inner card flips



alateos
29 Feb 2012, 2:23 PM
Hi,

I have a top toolbar that I would like to switch with another toolbar. In other words, I would like to redefine the toolbar based on where the user is in the mobile app.

What is the best way to do this?

Thanks!
alateos

mitchellsimoens
1 Mar 2012, 1:26 PM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Panel-method-removeDocked
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Panel-method-addDocked

alateos
1 Mar 2012, 1:30 PM
Ok that was awesome!!! Much appreciated.

alateos

alateos
1 Mar 2012, 1:37 PM
Strangely enough, the reverse of switching the toolbars (home1) does not work:


function get_article_details()
{
rootPanel.setActiveItem("article_detail",{type:'slide', direction:'right'});
rootPanel.removeDocked(topToolbar);
rootPanel.addDocked(topFullToolbar);
}

function home1()
{
rootPanel.setActiveItem("main_page",{type:'slide', direction:'left'});
refreshBottomBar();
document.getElementById("home").src = "images/code5-icons_62.png";
rootPanel.removeDocked(topFullToolbar);
rootPanel.addDocked(topToolbar);
}