笑いながらコードを書く。

vimから出たくないフロントエンドエンジニアの備忘録的な何か。

Sencha touch : itemsで指定したアイテムを左右に並べる場合

{ xtype: 'spacer' }を間に挟むことで実現できる

~
items: [
    {
        xtype : 'button',
        text  : 'Cancel',
        itemId: 'cancelButton'
    },
    {
        xtype : 'spacer'
    },
    {
        xtype : 'button',
        text  : 'Done',
        itemId: 'doneButton'
    }
]
~



spacerを間に指定した場合、可能な範囲で最大の幅になるため、結果的にボタンは左右に配置される。