Issue
If trying to add a view to a tableviewrow after view creation, then nothing happen. Which would also mean a potential memory leak
Use the testcase, click on row. A view should be added nothing happens. If you change and the view to row.view, then it works
Tested on
Tested on physical device(Galaxy S2 - 4.2) and Android simulator 4.0
Repro sequence
var win = Titanium.UI.createWindow();
win.backgroundColor = '#ccc';
var tableview = Ti.UI.createTableView();
win.add(tableview);
var rowData = [];
for (var i = 0; i < 10; i++) {
var row = Ti.UI.createTableViewRow({
title : 'row ' + i,
height:90,
name : 'row ' + i
});
row.view = Ti.UI.createView({
left:0,
right:0,
top:0,
bottom:0,
backgroundColor:'blue'
})
row.add(row.view);
rowData.push(row);
};
tableview.data = rowData;
tableview.addEventListener('click', function(e) {
if(e.row)
{
Ti.API.info('testing ')
if (!e.row.menu || e.row.menu === null){
e.row.menu = Ti.UI.createView({
width:50,
right:0,
backgroundColor:'black'
})
e.row.add(e.row.menu);
}
else {
e.row.remove(e.row.menu);
e.row.menu = null;
}
}
})
win.open();
@Martin Guillon Please check [JIRA Ticket Checklist](http://docs.appcelerator.com/titanium/latest/#!/guide/How_to_Submit_a_Bug_Report-section-29004732_HowtoSubmitaBugReport-JIRATicketChecklist) and complete this issue. As the ticket misses crucial information that must be included in order for a ticket to be accepted.
@Eduardo: may be you could tell me what s missing ? I have put a testcase, an android version to test it. What "critical" information are you missing?
Edit: updated labels and format.
I don't think there is anything wrong here other than the height is not specified for the view. Either give the height or set top and bottom to 0 to occupy the entire row height. Something like e.row.menu = Ti.UI.createView({ width:50, right:0, bottom:0, top:0, backgroundColor:'black' })
And so what does it behave differently if you add it to the row or to row.view?
Closing ticket as invalid with reference to the above comments.