0
votes

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'
      }],
    }]
  }]
});
1

1 Answers

1
votes

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'
                }],
            }]
        }]
    });