Titanium 多个可扩展列表视图Titanuim
我正在使用钛合金Appcelerator为android设备开发一个应用程序,我需要一个类似可扩展列表的列表视图,比如儿童中的儿童(例如:3层) 我经历了这个,工作了2层,当我尝试制作3层时,它给了我一个错误,我可以动态插入新行,但我无法访问自定义变量。我犯了什么错误 我可以获取第一个父级的值,但是当我单击动态添加的子级数据时 我发现“未定义””Titanium 多个可扩展列表视图Titanuim,titanium,expandablelistview,Titanium,Expandablelistview,我正在使用钛合金Appcelerator为android设备开发一个应用程序,我需要一个类似可扩展列表的列表视图,比如儿童中的儿童(例如:3层) 我经历了这个,工作了2层,当我尝试制作3层时,它给了我一个错误,我可以动态插入新行,但我无法访问自定义变量。我犯了什么错误 我可以获取第一个父级的值,但是当我单击动态添加的子级数据时 我发现“未定义”” 很抱歉这么晚才回复,但是您是否尝试过使用getParent()函数来获取任何元素的父对象 实际上,getParent()并没有列在Tianium文档
//Third Row
var row3 = Titanium.UI.createTableViewRow({
title : "User Management",
font : {
fontSize : '18dp',
fontWeight : 'bold'
},
height : 'auto',
isparent : true,
opened : false,
color : 'black',
borderRadius : 5,
borderColor : 'black',
borderWidth : 1,
sub : [{
className : 'children',
title : "Approve Registration",
isparent : true,
opened : false,
color : 'brown',
left : 20,
sub : [{
className : 'child1',
title : "Cross Connect",
color : 'blue',
left : 25,
font : {
fontSize : '15dp'
},
isparent : false,
}, {
className : 'child1',
title : "Smart Hands",
color : 'blue',
left : 25,
font : {
fontSize : '15dp'
},
isparent : false,
}],
height : 'auto',
font : {
fontSize : '15dp'
},
}, {
className : 'child',
title : "Invite Portal Users",
color : 'blue',
left : 20,
font : {
fontSize : '15dp'
},
isparent : false,
}, {
className : 'child',
title : "Add Users",
color : 'blue',
left : 20,
font : {
fontSize : '15dp'
},
isparent : false,
}]
});
rowData.push(row3);
tableView.addEventListener('click', function(e) {
Ti.API.info('isparent...' + e.row.isparent);
});