2012-06-04 46 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>' 

我希望帮你。