0

Sencha Touch に慣れていないので、ヘルプが必要です。ページ中央に2つのボタンを配置したい。私の問題は、コンテナが上部ツールバーと下部ツールバーの間で伸びないことです。

Ext.define("AccessibleMap.view.ChooseView", {
extend: "Ext.form.Panel",
alias: "widget.chooseview",

initialize: function () {

    console.log("Start");
    this.callParent(arguments);

    var topToolbar = {
        xtype: "toolbar",
        docked: "top",
        title: "Accessible Map",
    };

    var locationButton = {
        xtype: "button",
        maxWidth: '60%',
        minWidth: '50%',
        text: "Standort ausgeben",
        handler: this.onLocationBtnTap,
        scope: this,
        margin: '20 5 20 5'
    };

    var poisButton = {
        xtype: "button",
        maxWidth: '60%',
        minWidth: '50%',
        text: "POIs auswählen",
        handler: this.onPoiBtnTap,
        scope: this,
        margin: '20 5 20 5'
    };

    var buttonCont ={
        xtype: 'container',
        style:{
            background: 'red',
            'margin-top':' 14%'
        },
        layout:{
            type: 'vbox',
            align: 'center'
        },
        items:[
            locationButton,
            poisButton
        ]
    };

    //buttons for bottom-toolbar
    ...

    var tabpanel ={
        xtype: 'toolbar',
        docked: 'bottom',
        layout:{
            pack:'center',
            type: 'hbox'
        },
        items: [ homeButton, locateButton, optionsButton,  infoButton]
    };

    this.add([ topToolbar, buttonCont, tabpanel ]);
},

//listeners...
});

コンテナを赤く塗ったので、大きさがわかります。コンテナーを全画面表示にすると、コンテナーが空になります。誰か助けてくれませんか?

4

1 に答える 1