【发布时间】:2014-04-03 12:58:57
【问题描述】:
如何获取 TableViewRow 之间的空间如上图所示。
Window.js
for(var i=0;i < election.length ;i++){
//
tblRow_Election[i] = Titanium.UI.createTableViewRow({
height:(Ti.Platform.osname == 'ipad')?'280':'140',
width:Titanium.Platform.displayCaps.platformWidth,
left:(Ti.Platform.osname == 'ipad')?'20':'10',
right:(Ti.Platform.osname == 'ipad')?'20':'10',
color:'red',
touchEnabled: true,
borderRadius:'4',
borderWidth:'1',
borderColor:'green',
});
data.push(tblRow_Election[i]);
}
$.tbl_ElectionList.data = data;
窗口.tss
"#tbl_ElectionList":{
top:'40',
height:'auto',
backgroundColor:'transparent',
left:'10',
right:'10',
style:Titanium.UI.iPhone.TableViewStyle.GROUPED,
borderColor:'green',
separatorInsets: {
left:0,
right:0,
},
}
窗口.xml
<Alloy>
<Window id="ElectionWin" class="ElectionWindow" >
<View class="container" id = "view_Election" backgroundColor="white">
<TableView id="tbl_ElectionList">
</TableView>
</View>
</Window>
</Alloy>
无法获得每行之间的间隙。谁能建议我如何实现每个 tableviewRow 之间的差距。
@提前致谢
【问题讨论】:
-
@Armand 跟IOS有关!但使用跨平台钛工作室和javascript。
-
在那种情况下我很抱歉...你能重新设置标签,还是我需要这样做?
-
没问题,我会编辑并重新标记。
标签: javascript ios titanium tableview titanium-alloy