hiding keyboard after a button press
<p>OK, so I have an activity that expects from 2 to 6 numeric inputs. When the user has finished, a button is pressed to initiate processing and then intermediate results are displayed.  The problem is
that I can't get the keyboard to disappear and it covers up the Scrollable area where the results are to appear.</p>

<p>I am using 
    confirmButton.setOnClickListener(new View.OnClickListener() {
       public void onClick(View view) {</p>

<pre><code>     //hide keyboard :
     getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

         // do stuff
       }
    });
</code></pre>

<p>but this doesn't hide the keyboard.
I have to use the confirm button - since some of the inputs are optional. So I can't rely on a focus change listener or similar.  Is being inside the view of the button affecting my ability to hide the keyboard in the parent window?  </p>

<p>Or is something else more sinister going on? </p>

<p>I can click the back button and keyboard leaves, or I can click "NEXT" through all the expected inputs and then click the keyboard's "OK" but that forces the user to do unnatural things. </p>

<p>Any ideas?</p>
