Results 1 to 3 of 3

Thread: Fluid Navigationbar height

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Pensacola, FL
    Posts
    5
    Vote Rating
    1
      0  

    Default Fluid Navigationbar height

    I'm trying to make the height of my navigationbar fluid. I need the navigationbar height to be relative to a wrapping title, but the default styling for the title is absolutely positioned. Any suggestions?

    Code:
    Ext.define('PilotMobileApp.view.view', {
        extend: 'Ext.navigation.View',
        alias: 'widget.view',
    
    
        requires: [
            'tMobileApp.view.header',
            'MobileApp.view.phone.aList',
            'MobileApp.view.footer'
        ],
    
    
        config: {
            scrollable: true,
            defaultBackButtonText: '',
            navigationBar: {
                backButton: {
                    id: 'BackButton',
                    width: '3.2em',
                    height: '1.65em',
                    flex: 1
                },
                cls: 'favBar',
                hidden: true,
                id: 'navBar',
                ui: 'light',
                layout: {
                    align: 'start',
                    type: 'hbox'
                },
                items: [
                    {
                        xtype: 'button',
                        align: 'right',
                        border: 0,
                        cls: 'bookmark',
                        id: 'bookmarkButton',
                        itemId: 'bookmarkButton',
                        margin: '0 0.5em  0  0',
                        style: 'background-image: url("resources/images/star.png");background-size: 18.5px 19px; background-color : transparent;background-repeat: no-repeat;',
                        iconAlign: 'right',
                        text: ''
                    }
                ]
            },
            items: [
                {
                    xtype: 'header'
                },
                {
                    xtype: 'aList',
                    minHeight: '5em',
                    title: ''
                },
                {
                    xtype: 'footer'
                }
            ]
        }
    
    
    });

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    docked items need a height to have so by default the navigation bar will get 2.6em height but you can override that by setting the height on the navigation bar.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    Pensacola, FL
    Posts
    5
    Vote Rating
    1
      0  

    Default

    That's a good point. The title is being absolutely positioned so the bar ignores the height of the title. So once I applied the necessary styling to allow the text to wrap and overflow visible, I retrieve the height of the centered div which contains the title and dynamically apply the height of the centered div to the navigation bar. It seems to work for now. Thanks for you help.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •