2011-03-31 76 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