sencha touch html in tabBar not showing when I add title bar

user3733253

I am trying to create a layout that has a title bar and a tab bar just right below it.

I know how to assign a simple html text in each tab and I made it work when I just use tab bar without the title bar. It's as follows:

Ext.define('MyThirdApp.view.Feed', {
extend: 'Ext.TabPanel',
xtype: 'feedcard',

config:{
    tabBar: {
        layout: {
            pack: 'center'
        }
    },
    defaults: {
        styleHtmlContent: true
    },

    items: [
        {
            title: 'tab1',
            html: 'this is tab 1'
        },
        {
            title: 'tab2',
            html: 'here is tab2!'
        },
        {
            title: 'tab3',
            html: 'here is tab3!'
        }
        ]
    }
});

It works fine. Then I tried to add a title bar on top of it by defining another view and adding this tab bar in it

Ext.define('MyThirdApp.view.Main', {
fullscreen: true,
extend: 'Ext.Panel',
requires: [
    'Ext.TitleBar',
    'MyThirdApp.view.Feed'
],

config: {
    items:[
        {
            xtype: 'titlebar',
            title: 'The main title',
        },
        {xtype: 'feedcard'}
    ]
}


});

and it shows the title bar with just the tab bar below it. It doesn't show any html even when I click on all the different tabs. I have no idea why this happens or what I did wrong, and I tried playing with the layout and the extend: property of MyThirdApp.view.Main, changing it to Container or Panel, none works. I tried looking around at the Kitchensink example from Sencha but I found no part of the code that defines the title bar in their Tab bar UI source. Any help would be appreciated, thank you.

Sujata Chanda

Try adding layout: 'fit' in your main view:-

Ext.define('MyThirdApp.view.Main', {
fullscreen: true,
extend: 'Ext.Panel',
requires: [
    'Ext.TitleBar',
    'MyThirdApp.view.Feed'
],

config: {
    layout: 'fit',
    items:[
        {
            xtype: 'titlebar',
            title: 'The main title',
        },
        {xtype: 'feedcard'}
    ]
}
});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Sencha Touch add update tree store data

From Dev

How to add an image in the title bar using html?

From Dev

Add icons to Sencha Touch 2.3.1

From Dev

Add onLoad Listener to Sencha Touch List

From Dev

How to add an image in textfield in sencha touch

From Dev

Navigation Bar not showing title

From Dev

App icon not showing in title bar

From Dev

How do you add a Right Bar Button to a UINavigationController When the view has a nested Tabbar Controller?

From Dev

How can I add javascript touch spin to html when call javascript function

From Dev

Why i'm getting "titlebarViewController not supported for this window style" exception when trying to add title bar accessory view

From Dev

How to add labels to sliderfield Sencha Touch

From Dev

Trouble showing TabPanel inside TabPanel Sencha Touch 2

From Dev

add listener for multiple element sencha touch

From Dev

how to set header title as non scrollable for a detail page in sencha touch?

From Dev

Add onLoad Listener to Sencha Touch List

From Dev

Why is the list showing no elements in sencha touch 2?

From Dev

Sencha Touch panel html not visible

From Dev

sencha touch 2 toolbar title from json

From Dev

Double colored border in Sencha Touch Tabbar

From Dev

Sencha Touch - another view not showing on the tab panel

From Dev

How can i add google map into a tabpanel in Sencha Touch?

From Dev

unable to get parent reference in sencha touch when calling function is in html attribute

From Dev

How to add an image in textfield in sencha touch

From Dev

How do you add a Right Bar Button to a UINavigationController When the view has a nested Tabbar Controller?

From Dev

Sencha Touch : how to reference tab bar item from controller?

From Dev

Why i'm getting "titlebarViewController not supported for this window style" exception when trying to add title bar accessory view

From Dev

How can I add a tab control on to the window title bar

From Dev

How to add attribute to Text field in Sencha Touch?

From Dev

Fullscreen games are showing title bar

Related Related

  1. 1

    Sencha Touch add update tree store data

  2. 2

    How to add an image in the title bar using html?

  3. 3

    Add icons to Sencha Touch 2.3.1

  4. 4

    Add onLoad Listener to Sencha Touch List

  5. 5

    How to add an image in textfield in sencha touch

  6. 6

    Navigation Bar not showing title

  7. 7

    App icon not showing in title bar

  8. 8

    How do you add a Right Bar Button to a UINavigationController When the view has a nested Tabbar Controller?

  9. 9

    How can I add javascript touch spin to html when call javascript function

  10. 10

    Why i'm getting "titlebarViewController not supported for this window style" exception when trying to add title bar accessory view

  11. 11

    How to add labels to sliderfield Sencha Touch

  12. 12

    Trouble showing TabPanel inside TabPanel Sencha Touch 2

  13. 13

    add listener for multiple element sencha touch

  14. 14

    how to set header title as non scrollable for a detail page in sencha touch?

  15. 15

    Add onLoad Listener to Sencha Touch List

  16. 16

    Why is the list showing no elements in sencha touch 2?

  17. 17

    Sencha Touch panel html not visible

  18. 18

    sencha touch 2 toolbar title from json

  19. 19

    Double colored border in Sencha Touch Tabbar

  20. 20

    Sencha Touch - another view not showing on the tab panel

  21. 21

    How can i add google map into a tabpanel in Sencha Touch?

  22. 22

    unable to get parent reference in sencha touch when calling function is in html attribute

  23. 23

    How to add an image in textfield in sencha touch

  24. 24

    How do you add a Right Bar Button to a UINavigationController When the view has a nested Tabbar Controller?

  25. 25

    Sencha Touch : how to reference tab bar item from controller?

  26. 26

    Why i'm getting "titlebarViewController not supported for this window style" exception when trying to add title bar accessory view

  27. 27

    How can I add a tab control on to the window title bar

  28. 28

    How to add attribute to Text field in Sencha Touch?

  29. 29

    Fullscreen games are showing title bar

HotTag

Archive