Skip to content

Instantly share code, notes, and snippets.

@mobidevpro
Created December 20, 2011 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mobidevpro/1502294 to your computer and use it in GitHub Desktop.
Save mobidevpro/1502294 to your computer and use it in GitHub Desktop.
var win = Ti.UI.createWindow({
title : 'Profile'
});
var mainViewHeight = Ti.Platform.displayCaps.platformHeight
- ClubTonight.ui.defaults.iphone.statusBarHeight
- ClubTonight.ui.defaults.iphone.navBarHeight
- ClubTonight.ui.defaults.iphone.tabBarHeight;
var scrollView = Titanium.UI.createScrollView({
top : 0,
contentWidth : Ti.Platform.displayCaps.platformWidth,
contentHeight : 'auto',
height : mainViewHeight,
verticalBounce : false,
backgroundColor : '#550000',
showVerticalScrollIndicator : true
});
var view = Ti.UI.createView({
top : 0,
width : Ti.Platform.displayCaps.platformWidth,
height : mainViewHeight,
layout : 'vertical',
backgroundGradient : {
type : 'linear',
startPoint : {x: 0, y: 0},
endPoint : {x: 0, y: mainViewHeight},
colors : ['#777777', '#222222', '#000000']
}
});
scrollView.add(view);
win.add(scrollView);
var textFieldParams = {
width : '270dp',
height : '35dp',
borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
font: {
fontSize : 18
}
};
var firstNameField = Ti.UI.createTextField({
top : '20dp',
width : textFieldParams.width,
height : textFieldParams.height,
borderStyle : textFieldParams.borderStyle,
font : textFieldParams.font,
hintText : 'First Name'
});
var lastNameField = Ti.UI.createTextField({
top : '20dp',
width : textFieldParams.width,
height : textFieldParams.height,
borderStyle : textFieldParams.borderStyle,
font : textFieldParams.font,
hintText : 'Last Name',
});
var passwordField = Ti.UI.createTextField({
top : '20dp',
width : textFieldParams.width,
height : textFieldParams.height,
borderStyle : textFieldParams.borderStyle,
font : textFieldParams.font,
passwordMask : true,
hintText : 'Password',
autocapitalization : Ti.UI.TEXT_AUTOCAPITALIZATION_NONE
});
var confirmPasswordField = Ti.UI.createTextField({
top : '20dp',
width : textFieldParams.width,
height : textFieldParams.height,
borderStyle : textFieldParams.borderStyle,
font : textFieldParams.font,
passwordMask : true,
hintText : 'Confirm Password',
autocapitalization : Ti.UI.TEXT_AUTOCAPITALIZATION_NONE
});
var saveButton = Ti.UI.createButton({
top : '25dp',
left : '25dp',
height : '41dp',
width : '272dp',
title : 'Save',
color : '#000000',
font: {
fontSize : 18,
fontWeight : 'bold'
}
});
ClubTonight.ui.helpers.setButtonImageBackground({
button : saveButton,
backgroundImage : '/imgs/RegisterDisabled.png',
backgroundSelectedImage : '/imgs/RegisterPressed.png'
});
var logoutButton = Ti.UI.createButton({
top : '25dp',
width : '272dp',
height : '41dp',
title : 'Logout',
color : '#ffffff',
font: {
fontSize : 18,
fontWeight : 'bold'
}
});
ClubTonight.ui.helpers.setButtonImageBackground({
button : logoutButton,
backgroundImage : '/imgs/SignInDisabled.png',
backgroundSelectedImage : '/imgs/SignInPressed.png'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment