title: Android Hide Keyboard Not Working - cannot hide soft keyboard
body: <p>I'm developing on the Droid Incredible (and have tested on a 1.5 AVD Emulator as well), and one of the tabs in my tab widget consists of a listview and a row with an EditText and a Send button (for a chat feature). I am using the following to close the soft keyboard once I click Send, but it's not working. This is identical to code I've found elsewhere that people have upvoted as correct.</p>
  
  <p>See anything I'm missing?</p>
  
  <pre><code>// in Button's onClick():
  EditText chatTextBox = (EditText) findViewById(R.id.chat_entry);
  // Handle button click ...
  chatTextBox.setText("");
  
  InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
  imm.hideSoftInputFromWindow(chatTextBox.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
  </code></pre>
  
  <p>I also tried changing the flag to 0. No luck. Anyone know what's up??</p>
  
  <p>****EDIT**** Just realized I was originally using <code>hideSoftInputFromInputMethod()</code> instead of <code>hideSoftInputFromWindow()</code>. Changing it didn't make it work though...</p>