2011-03-31 94 views
2

我有一个按钮在底部的列表,如果您滚动到底部,只能看到按钮。当我打开手机横向模式时,它允许我滚动,但不能使用纵向模式。我无法弄清楚为什么我可以在一个视图中滚动而不是另一个?Sencha Touch垂直滚动问题

这里是我的配置代码:

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) 
        } 
       ] 
      } 
     ] 

    }; 

任何建议,感谢这么多?

回答

4

我没有得到机会尝试了这一点,这些 1.添加布局:“适应”

items: [ 
     { 
      scroll: 'vertical', 
      xtype: 'container', 
      layout: 'fit', 
      items: [this.customizationList] 
     }, 

如果没有工作,我会用,而不是列表的数据视图,看看是否这样可行。

我基于这个我在这里读到的类似(但不同)的问题。

Sencha forums post

如果你摸不着头脑,让我们知道...

+0

当我将“布局:‘适应’”我的代码,它只是压扁的所有组件一起到屏幕上,几个组件甚至失踪。 – 2012-08-29 00:57:17