Dear people,
Im loading a tableview whitin a scrollableview, everythings works fine, but when im selecting the row there a disapearing some views and labels whitin my custom row when the selection-background has been shown.... (weird behaviour)
Are there some fixes? Or how can i make it work well?
3 Answers
Check out for same name of object added into a view or same object added in to multiple view.
There is another possibility that you did not added object into right container.
but it is not predictable till code shown.
It getting weirder, the problem is that if i set a backgroundColor on a label or view that one dissapears, nog the label text it self only the backgroundColor. Maybe this helps solving the problem?
better: im adding the code:
for building the tableview:
var instance = Ti.UI.createTableView({ backgroundColor:'transparent', separatorStyle:Titanium.UI.iPhone.TableViewSeparatorStyle.NONE, separatorColor: 'transparent', showVerticalScrollIndicator:true });for building the rows:
var row = Ti.UI.createTableViewRow( { className:'row', backgroundColor:'#fef7de', id:xmlArray[i][0], filter:xmlArray[i][1], arrID:i, height:66, width:320 }); var programLabel = Ti.UI.createLabel({ font:{fontSize:13, fontFamily:'DIN Next LT Pro'}, text:xmlArray[i][1].toUpperCase(), color:'#353432', shadowColor:'#e3e0da', shadowOffset:{x:1,y:1}, left:70, top:12, arrID:i, height:16 }); var stillLabel = Ti.UI.createLabel({ font:{fontSize:10, fontFamily:'DIN Next LT Pro'}, text:"NOG "+Math.floor(Math.random() * 200)+" MIN", color:'#353432', textAlign:'right', right:13, bottom:8, arrID:i }); var logo = Titanium.UI.createImageView({ image:'images/zenderlogos/'+xmlArray[i][2], width:50, height:49, left:9, top:9 }); var progressBar = Ti.UI.createView({ width:204, height:11, top:30, left:68, backgroundColor:'#cccccc' }); var progressSlider = Ti.UI.createView({ width:Math.floor(Math.random() * 202), height:9, left:1, top:1, backgroundColor:'#000000' }); row.backgroundImage = 'images/tableview/background-off.png'; row.selectedBackgroundImage = 'images/tableview/background-off.png'; rowCounter++; progressBar.add(progressSlider); row.add(progressBar); progressSlider.show(); row.add(programLabel); row.add(stillLabel); row.add(logo); data.push(row);
Your Answer
Think you can help? Login to answer this question!