42. var buttonOne = Titanium.UI.createButton({
title:'I am a Button',
height:40,
width:200,
top:10
});
var buttonTwo = Titanium.UI.createButton({
title:'I am also a Button',
image:'../images/chat.png',
width:200,
height:40,
top:60
});
43. // js
var buttonOne = Titanium.UI.createButton({
id: "buttonOne",
className: "button"
});
var buttonTwo = Titanium.UI.createButton({
id: "buttonTwo",
className: "button"
});
// jss
#buttonOne {
title:'I am a Button';
width:200;
height:40;
top:10
}
#buttonTwo {
title:'I am also a Button';
image:'../images/chat.png';
width:200;
height:40;
top:60
}
.button {
height: 40;
width: 200;
}