Skip to content

Instantly share code, notes, and snippets.

@alexnaspo
Last active October 12, 2015 17:08
Show Gist options
  • Save alexnaspo/4059914 to your computer and use it in GitHub Desktop.
Save alexnaspo/4059914 to your computer and use it in GitHub Desktop.
easy facebook app style username/password fields using Appcelerator
var fieldContainer = Ti.UI.createView({
backgroundColor:'#fff',
borderRadius:5,
width:'80%',
height:Ti.UI.SIZE,
layout:'vertical'
});
var username = Ti.UI.createTextField({
width:Ti.UI.FILL,
hintText:'Email',
height:'40dp',
backgroundColor:'#fff'
});
var line = Ti.UI.createView({
width:Ti.UI.FILL,
height:'1dp',
backgroundColor:'#ccc'
});
var password = Ti.UI.createTextField({
width:Ti.UI.FILL,
hintText:'Password',
passwordMask:true,
height:'40dp',
backgroundColor:'#fff'
});
fieldContainer.add(username);
fieldContainer.add(line);
fieldContainer.add(password);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment