[TIMOB-12326] Android: Ti.UI.Android.hideSoftKeyboard not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-18T14:51:34.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.2, Release 3.1.0, 2013 Sprint 02 API, 2013 Sprint 02 |
Components | Android |
Labels | api, module_android, qe-testadded |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2013-01-17T16:14:32.000+0000 |
Updated | 2013-01-24T05:57:42.000+0000 |
Description
hideSoftKeyboard doesn't hide keyboard appropriately.
var win = Ti.UI.createWindow({backgroundColor: '#000000'});
var search = Titanium.UI.createSearchBar({
barColor:'#000',
showCancel:true,
height:43,
top:0
});
// create table view data object
var data = [
{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff'},
{title:'Row 2', hasDetail:true, color:'green', selectedColor:'#fff'},
{title:'Row 3', hasCheck:true, color:'blue', selectedColor:'#fff'},
{title:'Row 4', color:'orange', selectedColor:'#fff'},
{title:'Row 5'},
{title:'Row 6'},
{title:'Row 7'},
{title:'Row 8'},
{title:'Row 9'},
{title:'Row 10'},
{title:'Row 11'},
];
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
search:search
});
// add table view to the window
win.add(tableview);
search.addEventListener('focus', function(e) {
Ti.UI.Android.hideSoftKeyboard();
});
win.open();
1. Run code, you should not see keyboard.
PR https://github.com/appcelerator/titanium_mobile/pull/3725
Tested with: SDK:3.1.0.v20130123144204,3.0.2.v20130123192623 Studio:3.0.1.201212181159 Device: Android nexus7(v 4.1) Ti.UI.Android.hideSoftKeyboard woks as expected.