Hi, there is my code>>
index.xml:
<Alloy> <Window class="container"> <View id="view_header"> <Label id="title"></Label> </View> <View id="view_body"> </View> </Window> </Alloy>index.js:
$.title.text="hello word"; var button=[]; for (var i=0; i < 4; i++){ button[i] = Titanium.UI.createButton({ title: "item"+i, top: "6%", width:"100", height:"50", font: { fontSize: 11, color:"#000", textAlign:"center" }, backgroundColor: "#9DF" }); $.view_body.add(button[i]); } $.index.open();index.tss:
".container": { backgroundColor:"white", layout: "vertical" } "view_header": { backgroundColor:"white", layout: "vertical" } "view_body": { backgroundColor:"blue", layout: "vertical" }My problem: Always no show anything in view_body neither background blue.
Need your help! Thanks!