title: Closing keyboeard, submit button
body: <p>I need to close the keyboard when a user presses a submit button so the data behind the keyboard can be seen. Here is how I have the button wired, but its not working.</p>
  
  <p>Any ideas?</p>
  
  <pre><code>        Button clearbutton = (Button)findViewById(R.id.Submitbutton);
          Submitbutton.setOnClickListener(new View.OnClickListener() {
  
              public void onClick(View v) {
                  // TODO Auto-generated method stub
  
                  {
  
                      //...etc...
                      getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
  
  
                  }
  </code></pre>