javascript Sencha Touch 垂直滚动问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5501734/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sencha Touch Vertical Scroll Issue
提问by Xtian
I have a list with a button at the bottom, you only see the button if you scroll to the bottom. When I turn my phone landscape mode it allows me to scroll but not with it is in portrait mode. I can't figure out why I can scroll in one view but not the other??
我有一个底部有一个按钮的列表,只有滚动到底部才能看到该按钮。当我打开手机横向模式时,它允许我滚动但不能在纵向模式下滚动。我不明白为什么我可以在一个视图中滚动,而不能在另一个视图中滚动??
here is my config code:
这是我的配置代码:
var config = {
cls: 'customizationScreen',
titlebarTitle: 'Customize',
scroll: 'vertical',
layout: {
type: 'vbox'
},
items: [
{
scroll: 'vertical',
xtype: 'container',
items: [this.customizationList]
},
{
layout: {
type: 'hbox',
align: 'center',
pack: 'center'
},
defaults: {
xtype: 'button',
baseCls: 'greyButtonUp orderButton',
pressedCls: 'greyButtonDown'
},
items: [
{
text: 'Check-Out',
handler: Ext.createDelegate(this.onCheckOutClick, this)
}
]
}
]
};
Any suggestions, thanks so much?
任何建议,非常感谢?
回答by ballmw
I haven't gotten a chance to try this out these 1. Add layout:'fit'
我还没有机会尝试这些 1. 添加布局:'fit'
items: [
{
scroll: 'vertical',
xtype: 'container',
layout: 'fit',
items: [this.customizationList]
},
If that didn't work I would use a DataView instead of a List and see if that works.
如果那不起作用,我将使用 DataView 而不是 List 并查看是否有效。
I'm basing this on similar (but different) issue I read about here.
我基于我在这里读到的类似(但不同)的问题。
If you figure this out let us know...
如果你弄清楚了,请告诉我们...