Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12326] Android: Ti.UI.Android.hideSoftKeyboard not working

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-01-18T14:51:34.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.2, Release 3.1.0, 2013 Sprint 02 API, 2013 Sprint 02
ComponentsAndroid
Labelsapi, module_android, qe-testadded
ReporterHieu Pham
AssigneeHieu Pham
Created2013-01-17T16:14:32.000+0000
Updated2013-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.

Comments

  1. Vishal Duggal 2013-01-18

    PR https://github.com/appcelerator/titanium_mobile/pull/3725
  2. Anshu Mittal 2013-01-24

    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.

JSON Source