Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Settings Page
- var settingshome = Ti.UI.createWindow({
- title : 'Settings',
- backgroundColor : '#000000',
- layout : 'vertical',
- });
- var settingsview = Ti.UI.createView({
- width : '100%',
- height : '100%',
- backgroundColor : 'blue',
- });
- var title = Ti.UI.createLabel({
- top : '20',
- text : 'Settings',
- });
- var btnback = Ti.UI.createButton({
- top : '50',
- left : '50',
- width : '50',
- height : '50',
- image : 'images/back.png',
- id : "back button",
- });
- var red = Titanium.UI.createButton({
- title : 'Red',
- bottom : 100,
- width : 130,
- height : 50,
- align : 'center',
- id : 'red',
- });
- function changecolor(e) {
- alert("The " + e.source.title + " Button Works!!!");
- };
- function back() {
- settingshome.openWindow(home);
- };
- btnback.addEventListener('click', back);
- red.addEventListener('click', changecolor);
- settingsview.add(red);
- settingsview.add(btnback);
- settingsview.add(title);
- settingshome.add(settingsview);
- settingshome.open();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement