2012-06-04 118 views
0

我正在使用sencha touch2。我想要在單個標籤中顯示四個標籤內容,如下面的代碼所示。根據要求,我只有一個標籤,對於這個標籤,我需要添加四個標籤內容。所以在這個內容中我使用標籤來分割每個標籤。生成apk/ipa文件後。在ipad的即將到來的罰款,它正在按照我們的要求一個接一個地顯示另一個標籤。但是在android手機中它並沒有拆分內容,文本即將到來而不會斷線。有人可以告訴我如何解決這個問題。謝謝如何使用sencha touch2在單個標籤中顯示四個標籤內容

Ext.define("MyPath", { 
    extend: 'Ext.Panel', 
    xtype: 'SpecificationView', 
    requires: ['Ext.Label'], 
    config: { 

     title: 'Specification', 
     iconCls: 'star', 
     scrollable: true, 
     xtype: 'dataview', 
     layout: { 
      align: 'center', 
      pack: 'center' 
     }, 
     items: [       
      { 
       margin: '10', 
       xtype: 'label', 
       html: '<label><b>Flooring</b></label></br><label>Combination of Granite/Vitrified tiles in common areas. Vitrified tiles in foyer, living, dining and kitchen. Ceramic tiles in bedroom, balcony and utility.</label></br></br><label ><b>Doors & Windows</b></label></br><label>Apartment main door in teakwood frame with polished designer shutters. with mosquito mesh and safety grill</label>' 
      } 
      ] 
    } 

});

+0

你可以發佈你的ipad輸出的截圖嗎? –

回答

1

嘿@ user1177921試試這個請,

html: '<label><b>Flooring</b></label><br />' + 
     '<label>Combination of Granite/Vitrified tiles in common areas. Vitrified tiles in foyer, living, dining and kitchen. Ceramic tiles in bedroom, balcony and utility.</label><br />' + 
     '<label ><b>Doors & Windows</b></label><br />' + 
     '<label>Apartment main door in teakwood frame with polished designer shutters. with mosquito mesh and safety grill</label>' 

我希望幫你。