-
8 Oct 2012 9:00 AM #1
Unanswered: Fluid Navigationbar height
Unanswered: 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' } ] } });
-
10 Oct 2012 5:08 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,682
- Vote Rating
- 435
- Answers
- 3111
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 @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
11 Oct 2012 6:55 AM #3
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.


Reply With Quote