title: How to hide SoftKeyboard in apache cordova android
body: <p>I have an old android app developed with cordova and i was not too familiar with it as native java. In my app case when it opened it was displaying a login screen with username, password and Login button and i found the file that handles this functionality was <code>signin.js</code> and code was as below</p>
  
  <pre><code>Ext.define('GBMob.view.Signin',{
      extend: 'Ext.form.Panel',
  
      requires: [
          'Ext.data.JsonP',
          'Ext.field.Password',
          'Ext.form.FieldSet',
          'GBMob.view.GBHome'
      ],
  
      config: {
  
      items: [
      {
          xtype: 'fieldset',
          title: 'User Info',
          instructions: 'Enter Username/Email and Password.',
          maxWidth: 550,
  
          items: [
          {
              xtype: 'textfield',
              name: 'username',
              label: 'Username'
          },
          {
              xtype: 'passwordfield',
              name: 'password',
              label: 'Password'
          },
          {
              xtype: 'button',
              text: 'Sign in',
              ui: 'confirm',
              padding: 2,
              margin: 15,
              flex: 0.3,
  
              handler: function() {
  
                  var loadingMask = {
                      xtype: 'loadmask', 
                      message: 'Signing in ...' 
                  };
  
                  Ext.Viewport.setMasked(loadingMask);
  
                  var softkeyboard = window.cordova.plugins.SoftKeyBoard;
                  softkeyboard.hide();
  
                  username = SigninView.getValues().username;
                  password = SigninView.getValues().password;
  
                  Ext.data.JsonP.request({
  
                      url: 'https://xxxxxx.com/api/login/',
                      scope: this,
  
                      params: {
                          data:  base64.encode(username.toLowerCase() + ':' + password)
                      },
  
                      success: function(result) {
  
                          ........
                          ........
                          ........
                  console.log("Signing in with Username: " + username + " and password: " + password);
              }
          }
          ]
      }]
      }
  });
  </code></pre>
  
  <p>So as of now the code was working perfectly, but the problem was after the user entered <code>username and password</code> and clicked on the <code>Sign in</code> button the <strong><code>keyboard was not disappearing</code></strong> and due to which after redirecting to dashboard half of the dashboard page was disappearing(vanishing), i mean only half of the page was visible and half page was blank(may be the previous login screen keyboard portion was making the dashboard half screen invisible/blank white background). So i decided to hide the keyboard immediately after clicking on the <code>Sign in</code> button and hence done the following</p>
  
  <ol>
  <li>Searched the keyboard plugin as <code>cordova plugin search keyboard</code></li>
  <li>Installed the SoftKeyboard plugin as <code>cordova plugin add org.apache.cordova.plugin.softkeyboard</code> </li>
  <li>Added the following two lines in signin.js file as mentioned in the above code </li>
  </ol>
  
  <p><code>var softkeyboard = window.cordova.plugins.SoftKeyBoard;</code> </p>
  
  <p><code>softkeyboard.hide();</code></p>
  
  <p>but after add the above two lines i was not able to login at all and the app was displaying just the signing in .... mask continuosly. </p>
  
  <p>So whats wrong with above added two lines of code and what need to do to hide the keyboard immediately after clicking on the button in cordova ?</p>
  
  <p>Does anyone had any idea on how to hide keyboard in cordova ?</p>