Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch Slide
    primarykey
    data
    text
    <p>I am starting to use Sencha Touch and have already read their "<a href="http://dev.sencha.com/deploy/touch/getting-started.html" rel="nofollow">Getting Started</a>" gide, however I am currently stuck in what I want to do and haven't been able to find any proper tutorial or example of what I need.</p> <p>I want to make a panel so that when a user clicks on a specific button the panel slides and the toolbar on top disappears (or slides as well) and a new one appear just as it would happen on a native iOS app.</p> <p>Here's my Sencha code so far:</p> <pre><code>Ext.setup({ tabletStartupScreen: 'tablet_startup.png', phoneStartupScreen: 'phone_startup.png', icon: 'icon.png', glossOnIcon: false, onReady: function() { /*HANDLERS *********************************************************************************/ 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) { }; /*BUTTONS *********************************************************************************/ var aboutAppBtn = [{ text: 'Sobre App', ui: 'round', handler: showAlert }]; var checkInBtn = [{ text: 'Check-in', ui: 'forward', handler: tapHandler }]; var buscarCercaBtn = [{ text: 'Buscar local...', ui: 'button', handler: showAlert }]; var buttonsGroup1 = [{ text: 'Sobre App', ui: 'round', handler: showAlert }, { text: 'Check-in', ui: 'forward', handler: tapHandler }]; /*PHONE || SCREEN **********************************************************************************/ if (Ext.is.Phone) {// Phone has far less screen real-estate var dockedItems = [{ xtype: 'toolbar', dock : 'top', ui: 'light', title: 'My Toolbar', items: buttonsGroup1 }]; }else{ //var dockedItems = [topTB]; aboutAppBtn.push({xtype: 'spacer'}); var dockedItems = [{ xtype: 'toolbar', dock : 'top', ui: 'light', title: 'My Toolbar', items: aboutAppBtn.concat(checkInBtn) },{ xtype: 'button', dock: 'bottom', ui: 'action', text: 'Buscar local...', handler: showAlert }]; } var green = { style: 'background-color:#3b7E00; color:white;', title: 'Green', html: 'Green' }; var blue = { style: 'background-color:#0F0; color:white;', title: 'Blue', html: 'Blue' }; /*PANELS **********************************************************************************/ var mainPanel = new Ext.Panel({ dockedItems: dockedItems, layout: 'card', cardSwitchAnimation: {type: 'flip', duration: 500}, fullscreen : true, items: [green, blue] }); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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