如何使用sencha touch2在单个标签中显示四个标签内容

时间:2012-06-04 11:49:31

标签: sencha-touch sencha-touch-2

我正在使用sencha touch2。我想在一个标签中显示四个标签内容,如下所示。根据要求,我只有一个标签,对于这个标签,我需要添加四个标签内容。所以在这个内容中我使用标签来分割每个标签。生成apk / ipa文件后。在ipad中即将推出,按照我们的要求在另一个标签上显示一个。但是在Android手机中它并没有分割内容,文本是连续的而不会破坏线。有人可以告诉我如何解决这个问题。谢谢

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

});

1 个答案:

答案 0 :(得分: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>'

我希望能帮助你。