Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
Created December 13, 2018 18:10
Show Gist options
  • Save exclusiveTanim/81e70baae2b8df7f578d73257e3d8037 to your computer and use it in GitHub Desktop.
Save exclusiveTanim/81e70baae2b8df7f578d73257e3d8037 to your computer and use it in GitHub Desktop.
Keyboard Hide touch
var window = Ti.UI.createWindow({
backgroundColor:'yellow'
});
var view = Titanium.UI.createView({
backgroundColor : 'red',
width : 300,
height : 300
});
var textField = Ti.UI.createTextField({
backgroundColor : '#fafafa',
color : 'black',
top : '10',
width : 250,
height : 40
});
view.add(textField);
window.add(view);
view.addEventListener("click", hideSoftKeyboard);
function hideSoftKeyboard(e) {
textField.blur();
}
//For android: Ti.UI.Android.hideSoftKeyboard();
window.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment