2013-07-31 124 views
1

我想創建一個帶有兩個列表和一個輸入窗體的標題欄和tabpanel的視圖,所以我 首先創建一個標題欄,然後創建一個tabpanel.But我點擊每個選項卡,所有選項卡都會上下抖動,當我將tabBarPosition配置爲底部時,它看起來不錯。 那麼,如何解決這個問題?而且,如何清除tabBar的默認背景?下面在tabpanel中的tabbar會在使用sencha touch時輕蔑2.1

是我的看法:

Ext.define('MyApp.view.MyView', 
    { 
     extend : 'Ext.Container', 
     id : 'MyView', 
     xtype : 'MyView', 
     config : { 
      xtype : 'panel', 
      layout : 'vbox', 
      items : [ 
       { 
         xtype : 'titlebar', 
         docked : 'top', 
         title : 'MyView', 
         items : [ 
          { 
           text : 'goback', 
           ui : 'back', 
           align : 'right', 
           listeners : { 
            tap : function(){ 
             backwardPage('back'); 
            } 
           } 
          },{ 
           text : 'index', 
           ui : 'home', 
           align : 'left', 
           listeners : { 
            tap : function() { 
             forwardPage('index','index'); 
            } 
           } 
          }  
         ] 
       }//title bar 
       ,{ 
          xtype : 'tabpanel', 
          style : 'border:1px solid red;', 
          //tabBarPosition : 'bottom', 
          flex : 1, 
          ui : 'light', 
          layout : { 
           type : 'card', 
           align : 'middle', 
           pack : 'center' 
          }, 
          defaults: { 
           styleHtmlContent: true 
          }, 
          items : [ 
           { 
              title : 'One', 
              html : 'one' 
           } 
           , { 
              title : 'two', 
              html : 'two' 
           } 
           ,{ 
              title : 'three', 
              html : 'three' 
           } 
          ] 
         }//top buttons 
      ] 
     }//config 
}); 

回答

0

這發生在我身上也。我無法找到解決方案。

相關問題