Created
July 17, 2012 22:58
-
-
Save grantges/3132716 to your computer and use it in GitHub Desktop.
TextField - Focus on Window Open Event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({layout: 'vertical', backgroundColor:'#fff'}); | |
var textField = Ti.UI.createTextField({ | |
height: Ti.UI.SIZE, | |
width: '90%', | |
font: {fontSize: 20}, | |
softKeyboardOnFocus: Ti.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS | |
}); | |
win.add(textField); | |
win.addEventListener('open', function(e){ | |
textField.focus(); | |
}); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment