Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    14
    Vote Rating
    2
    KoSik is on a distinguished road

      0  

    Default Ext.navigation.View navigationBar long title wrong alignment in Sencha Touch 2.1

    Ext.navigation.View navigationBar long title wrong alignment in Sencha Touch 2.1


    Hi.

    When there is no additional buttons added to navigationBar of navigationView - everything is working well. I also works well if title is short. But when title is cut - there are problems with alignment and title behaves unexpectable. See screenshots:

    iOS Simulator Screen shot Jan 22, 2013 11.01.39 AM.pngiOS Simulator Screen shot Jan 22, 2013 11.01.32 AM.pngiOS Simulator Screen shot Jan 22, 2013 11.01.24 AM.png


    Here is the code on my NavigationView:

    Code:
    Ext.define("iCoordinator.view.time.Nav", {
        extend: 'Ext.navigation.View',
        xtype: 'timenavigationview',
    
    
        config: {
            autoDestory: true,
            navigationBar: {
                ui: 'default'
            }
        },
    
    
        initialize: function () {
            var me = this;
    
    
            var nextIntervalBtn = Ext.create('Ext.Button', {
                itemId: "nextIntervalBtn",
                iconMask: true,
                iconCls: 'arrow_right',
                align: 'right',
                handler: this.onNextIntervalBtnClick,
                scope: this
            });
    
    
            var previousIntervalBtn = Ext.create('Ext.Button', {
                itemId: "previousIntervalBtn",
                iconMask: true,
                iconCls: 'arrow_left',
                align: 'left',
                handler: this.onPreviousIntervalBtnClick,
                scope: this
            });
    
    
            this.getNavigationBar().add([nextIntervalBtn, previousIntervalBtn]);
    
    
            me.getNextIntervalBtn = function() {
                return nextIntervalBtn;
            }
    
    
            me.getPreviousInteralBtn = function() {
                return previousIntervalBtn;
            }
    
    
            this.callParent(arguments);
        },
    
    
        setTitle: function(title) {
            this.getNavigationBar().setTitle(title);
        },
    
    
        onPreviousIntervalBtnClick: function() {
            this.fireEvent('previousIntervalCommand', this);
        },
    
    
        onNextIntervalBtnClick: function() {
            this.fireEvent('nextIntervalCommand', this);
        }
    });
    Actually, title looks good only when navigationView is first initialized. After pushing/popping views you can see on screenshots, what happens.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    With your provided test case, I don't see anything wrong.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    14
    Vote Rating
    2
    KoSik is on a distinguished road

      0  

    Default


    You are right, when navigationView is used separately (I tried it myself) - everything works well. But my bug appears if I put this navigationView inside other Container. I my case it is this container:

    Code:
    Ext.define("iCoordinator.view.time.Main", {
        extend: 'Ext.Container',
        xtype: 'timemainview',
    
    
        config: {
            layout: 'fit'
        },
    
    
        initialize: function () {
            var me = this;
            this.callParent(arguments);
    
    
            var timeNavigationView = {
                xtype: 'timenavigationview'
            }
    
    
            this.add([timeNavigationView]);
        }
    });

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    14
    Vote Rating
    2
    KoSik is on a distinguished road

      0  

    Default


    You can use this controller as an example:

    Code:
    Ext.define('iCoordinator.controller.TimeController', {
        extend: 'Ext.app.Controller',
    
    
        config: {
            views: [
                'iCoordinator.view.time.Nav',
                'iCoordinator.view.time.Main'
            ],
            refs: {
                timeNavigationView: 'timenavigationview'
            },
    
    
            control: {
                timeNavigationView: {
                    nextIntervalCommand: 'onNextIntervalCommand'
                }
            }
        },
    
    
        onNextIntervalCommand: function() {
            var me = this;
    
    
            me.getTimeNavigationView().push({
               title: 'Very long title goes here lalala',
               html: "Text content"
            });
        }
    
    
    });

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi