Created
December 13, 2018 18:10
-
-
Save exclusiveTanim/81e70baae2b8df7f578d73257e3d8037 to your computer and use it in GitHub Desktop.
Keyboard Hide touch
This file contains hidden or 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 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