title: Android:Hide keyboard after button click
body: <p>I need to hide the android keyboard after a button click. </p>
  
  <p>I have seen many examples of how to do this, however, they all appear to use a specific editText object. </p>
  
  <p>e.g.</p>
  
  <pre><code>InputMethodManager imm = (InputMethodManager)getSystemService(
        Context.INPUT_METHOD_SERVICE);
  imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
  </code></pre>
  
  <p>My problem is that I am building the screen dynamically, thus there could be mane edit text fields. Is there a way the keyboard can be hidden without me having to specify which editText object I am hiding it for. </p>