title: How to close soft keyboard in fragment
body: <p>I have an EditText inside a fragment, which is in itself inside an actionbarsherlock tab. When I touch inside the EditText box a soft keyboard appears with one of the keys having a magnifying glass (search) icon. When I type some text and click on the search key I can process the typed-in-string in my onEditorAction, but the soft keyboard remains on display. How can I close it programatically?</p>
  
  <p>By the way if one answer is that I could configure some setting for EditText such that it closes automatically on search, I would still like to know if the soft keyboard can be closed with a method call as I also have my own search button on screen (nothing to do with the soft keyboard) and I would like the soft keyboard to close when that's pressed too.</p>
  
  <p>Note: Before anyone rushes to claim this question is a repeat of a previous question, I have seen many Q&amp;A's about hiding the soft keyboard at various points. Many of the answers seem inordinately complicated and in many it is not clear whether the idea is to permanently hide the keyboard or just just temporarily close it till the user taps on an EditText field again. Also some answers require calls to methods not available in fragments.</p>