Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

disable every second row in a table

$
0
0

Hi all, I'm creating a table view and want to disable every second row. I am working on android at the moment and have tried answers provided on the q and A but nothing has worked yet. Condensed code below:

for (i=0; i< 5; i++){
    var row=Titanium.UI.createTableViewRow({
        height: Ti.UI.SIZE,
        name:i,
        backgroundColor:'white'
    });
 
    var row2=Titanium.UI.createTableViewRow({
        height: '15dp',
        name:i,
        backgroundColor:'#204581',  
        touchEnabled:false,
        visible:false,
        focusable:false
    });
 
    if (i % 2 == 0){
 
    }
    else{
        ResponsesRow_data.push(row2);
    }
    ResponsesRow_data.push(row);
 
}
Responses_table.setData(ResponsesRow_data);
self.add(Responses_table);

Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>