Pergunta

I want to insert an image after a tabpanel in Sencha Touch 2, but it doesn't work. This is my code:

Ext.Viewport.add({
  xtype: 'panel',
  layout: 'vbox',
  fullscreen: true,
  items: [{
    xtype: 'image',
    width: 500,
    height: 100,
    src: 'http://placekitten.com/g/500/100'
  }, {
    xtype: 'tabpanel',
    tabBarPosition: 'bottom',
    items: [{
      title: 'Nous contacter',
      iconCls: 'user',
      html: 'page2',
      items: [{
        docked: 'top',
        title: 'title',
        xtype: 'titlebar'
      }],
    }]
  }]
});
Foi útil?

Solução

Try like this

    Ext.Viewport.add({
        xtype: 'panel',
        layout: 'vbox',
        fullscreen: true,
        items: [{
            xtype: 'image',
            width: '100%',
            height: '20%',
            src: 'http://placekitten.com/g/500/100'
        }, {
            xtype: 'tabpanel',
            tabBarPosition: 'bottom',
            height: '80%',
            items: [{
                title: 'Nous contacter',
                iconCls: 'user',
                html: 'page2',
                items: [{
                    docked: 'top',
                    title: 'title',
                    xtype: 'titlebar'
                }],
            }]
        }]
    });
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top