このコードを別の質問から取得し、4つのボタンでウィンドウ全体を埋めようとしています。
私がすることは何も影響を与えていないようです。このfullscreen: true
オプションは常に無視されているようです。すべての垂直方向のスペースを占めるようにレイアウトを調整する必要があることを知るための秘訣は何ですか?
理想的には、このソリューションが3x3
ボタンレイアウトでも機能することを望んでいます。
app.js
Ext.application({
launch: function() {
var view = Ext.create('Ext.Container', {
// fullscreen: true,
layout: {
type: 'vbox',
flex: 1
},
items: [{
xtype: 'container',
layout: 'hbox',
items: [{
xtype: 'button',
height: '50%',
text: 'flat button',
ui: 'plain',
flex: 1,
handler: function() {
alert('top left')
}
}, {
xtype: 'button',
height: '50%',
//ui: 'plain',
flex: 1,
handler: function() {
alert('top right')
}
}]
}, {
xtype: 'container',
layout: 'hbox',
items: [{
xtype: 'button',
height: '50%',
//ui: 'plain',
flex: 1,
handler: function() {
alert('bottom left')
}
}, {
xtype: 'button',
//ui: 'plain',
height: '50%',
flex: 1,
handler: function() {
alert('bottom right')
}
}]
}]
});
Ext.Viewport.add(view);
}
});
SenchaTouchCDNを使用する標準のindex.html。
<!doctype html>
<html manifest="" lang="en-US">
<head>
<meta charset="UTF-8">
<title>Sencha</title>
<link rel="stylesheet" href="http://extjs.cachefly.net/touch/sencha-touch-2.0.0/resources/css/sencha-touch.css" type="text/css">
<script type="text/javascript" src="http://extjs.cachefly.net/touch/sencha-touch-2.0.0/sencha-touch-all-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
<body>
</body>
</html>