Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this</p> <pre><code>var mainPanel,blue,green; Ext.application({ launch: function() { green = new Ext.Panel({ items:[ { xtype:'toolbar', title:'My Toolbar', ui:'light', docked:'top', items: [ { text: 'Sobre App', ui: 'round', handler: showAlert }, { xtype:'spacer' }, { text: 'Check-in', ui: 'forward', handler: tapHandler } ] } ], style: 'background-color:#3b7E3b', html: 'Green' }); blue = new Ext.Panel({ items:[ { xtype:'toolbar', title:'Check-In', ui:'light', docked:'top', items: [ { text: 'Back', ui: 'back', handler: backHandler } ] } ], style: 'background-color:#3b3b7E', html: 'Blue' }); mainPanel = new Ext.Panel({ layout: 'card', fullscreen : true, items: [green,blue] }); Ext.Viewport.add(mainPanel); } }); var showAlert = function(btn, event) { Ext.Msg.alert('Title', 'Diste ' + event.type + ' en el botón "' + btn.text + '"', Ext.emptyFn); }; var tapHandler = function(button, event) { mainPanel.animateActiveItem(blue,{type: 'slide'}); }; var backHandler = function(button, event) { mainPanel.animateActiveItem(green, {type: 'slide', direction: 'right'}); }; </code></pre> <p>Your html file should look like this</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html manifest="" lang="en-US"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Sencha Touch Knob&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="stylesheets/sencha-touch.css"&gt; &lt;/link&gt; &lt;script type="text/javascript" src="javascripts/sencha-touch-all-debug.js"&gt; &lt;/script&gt; &lt;script type="text/javascript" src="javascripts/app.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>sencha-touch.css,sencha-touch-all-debug.js files will come with the library. Put the above javascript code and put it in a new js file named app.js.</p> <p>If there are any errors, they will show up in the chrome developer tools console.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload