Appcelerator Titanium using common options for labels -
for ( = 0; < 10; i++) { var ypos = 30; var label1 = ti.ui.createlabel({ left : 0, top : ypos , width: "50%", backgroundcolor: "blue", height: 20, text: i.tostring(), textalign: ti.ui.text_alignment_center }); var label2 = ti.ui.createlabel({ left : "50%", top : ypos , width: "50%", backgroundcolor: "blue", height: 20, text: i.tostring(), textalign: ti.ui.text_alignment_center }); ypos += 30; }; i not use again , again following block of code in loop. width: "50%", backgroundcolor: "blue", height: 20, text: i.tostring(), textalign: ti.ui.text_alignment_center i using alloy. assigned class below var label2 = ti.ui.createlabel({ left : "50%", top : ypos , ...