TableViewRow Disable Click
Hi,
I want to use tableViewRow control just to display items on it and not a clickable link to navigate to another window/view. But how do i remove the orange selected thing that appears and the border like thing from it in android for this purpose? i do not want to navigate anywhere from that current tableViewRow. It is just for display purpose? Is that a way around that?
3 Answers
-
Try setting
selectionStyle:'none'
. -
you can try the parameter touchEnable: false but then you cant interact with it.
To get rid of the arrow like icon on the right you need to set hasChildren:false
I dont kbow what you mean by orange selected thing? i dont see it, can you shot me a screenshot?
-
As you can see below, all four rows are TableViewRow (dateTimeRow, rowHeadline, rowDescription & rowCredit). Selecting any of these rows in android makes it selectable despite of all the parameters i have passed with orange selected color appearing on it. I just want to know how do i get rid of it.
I will try to attach screen shot below although i am not too sure how to do that.
var dateTimeRow = Ti.UI.createTableViewRow({className:'a', height:'auto',touchEnabled:false,selectedBackgroundColor:'Black',borderWidth:0,borderColor:'Black',selectionStyle:'none',hasChildren:false }); dateTimeRow.add(labelDateTime); detailedData[x++] = dateTimeRow; var rowHeadline = Ti.UI.createTableViewRow({className:'b', height:'auto',touchEnabled:false,selectedBackgroundColor:'Black',borderWidth:0,borderColor:'Black',selectionStyle:'none',hasChildren:false }); rowHeadline.add(labelHeadline); detailedData[x++] = rowHeadline; var rowDescription = Ti.UI.createTableViewRow({className:'c', height:'auto',touchEnabled:false ,selectedBackgroundColor:'Black',borderWidth:0,borderColor:'Black',selectionStyle:'none',hasChildren:false}); rowDescription.add(labelDescription); detailedData[x++] = rowDescription; var rowCredit = Ti.UI.createTableViewRow({className:'d', height:'auto',touchEnabled:false,selectedBackgroundImage:'Black',borderWidth:0,borderColor:'Black',selectionStyle:'none',hasChildren:false }); rowCredit.add(labelCredit); detailedData[x++] = rowCredit; var tableview = Titanium.UI.createTableView({ data: detailedData}); w.add(tableview);