Titanium 钛:使用Ti.UI.SIZE+;迈瓦尔?

Titanium 钛:使用Ti.UI.SIZE+;迈瓦尔?,titanium,titanium-mobile,Titanium,Titanium Mobile,我想做的是增加ListView中每一行的高度。 我设置了一个height=Ti.UI.SIZE,不幸的是,使用这种方法时,为行设置的高度太小。 我希望单词和行的开始/结束之间有足够的空间(一种与css一起使用的填充) 有可能吗?谢谢 var template = { properties : { height : Ti.UI.SIZE, selectionStyle : Ti.UI.iPhone.ListViewCellSelectionStyle.NON

我想做的是增加ListView中每一行的高度。 我设置了一个height=Ti.UI.SIZE,不幸的是,使用这种方法时,为行设置的高度太小。 我希望单词和行的开始/结束之间有足够的空间(一种与css一起使用的填充)

有可能吗?谢谢

var template = {
    properties : {
        height : Ti.UI.SIZE,
        selectionStyle : Ti.UI.iPhone.ListViewCellSelectionStyle.NONE
    },
    childTemplates : [{
        type : 'Ti.UI.View',
        bindId : 'view',
        properties : {
            left : 0,
            width : 300,
            height : Ti.UI.SIZE,
            backgroundImage : "/images/blur_nero.png",
        },
        childTemplates : [{
            type : 'Ti.UI.Label',
            bindId : 'label',
            properties : {
                left : 5,
                width : 290,
                height : Ti.UI.SIZE,
                textAlign : "left",
                color : "white",
                font : {
                    fontSize : 10
                }
            }

        }]
    }]
};

var tabella = Ti.UI.createListView({
        width : 300,
        height : 375,
        bottom : 10,
        //separatorColor : 'transparent',
        separatorStyle : 'none',
        backgroundColor : 'transparent',
        separatorInsets : {
            left : 0,
            right : 0
        },
        showVerticalScrollIndicator : false,
        templates : {
            'plain' : template
        },
        defaultItemTemplate : 'plain',
        visible : false
    });

for (var i = 0; i < stagione[3].length; i++) {

            //var app_color = background_color[i];

            var dati_rec = stagione[3][i].split("#");

            var app_2 = dati_rec[1];
            if(app_2[0] == " "){
                app_2 = app_2.substring(1,app_2.length);
            }

            data_record.push({
                label : {
                    text : dati_rec[0] + "\n" + app_2
                },
                view : {
                    backgroundColor : "transparent"
                },
                properties : {
                    selectionStyle : Ti.UI.iPhone.ListViewCellSelectionStyle.NONE,
                    backgroundColor : "transparent"
                }
            });

}

intestazione.appendItems(data_record, {
            //animationStyle : Ti.UI.iPhone.RowAnimationStyle.TOP
});

var模板={
特性:{
高度:Ti.UI.SIZE,
selectionStyle:Ti.UI.iPhone.ListViewCellSelectionStyle.NONE
},
子模板:[{
键入:“Ti.UI.View”,
bindId:'视图',
特性:{
左:0,,
宽度:300,
高度:Ti.UI.SIZE,
背景图片:“/images/blur\u nero.png”,
},
子模板:[{
键入:“Ti.UI.Label”,
bindId:'标签',
特性:{
左:5,,
宽度:290,
高度:Ti.UI.SIZE,
textAlign:“左”,
颜色:“白色”,
字体:{
字体大小:10
}
}
}]
}]
};
var tabella=Ti.UI.createListView({
宽度:300,
身高:375,
底部:10,
//分光镜颜色:“透明”,
分隔符样式:“无”,
背景色:“透明”,
分离器组件:{
左:0,,
右:0
},
showVerticalScrollIndicator:假,
模板:{
“普通”:模板
},
defaultItemTemplate:“普通”,
可见:假
});
对于(var i=0;i
如果您想在顶部和底部留出更多空间,则应为父项使用布局属性“垂直”,然后根据需要设置子项的顶部属性。

您可以为标签提供顶部、底部和左侧属性。