title: Soft keyboard auto show when use AsyncTask
body: <p>I don't know why when I use <code>AsyncTask</code> to load data to an Adapter, after <code>AsyncTask</code> finishes, the soft keyboard shows on screen.</p>
  
  <p>There is a <code>Edittext</code> in the activity. If I delete the <code>EditText</code> on the Activity, after the <code>AsyncTask</code> finishes, the soft keyboard does not show.</p>
  
  <p>I use this code on <code>onPostExecute()</code> but it does not work:</p>
  
  <pre><code>protected void onPostExecute(String[] result) {
          hideSoftKeyboard(SearchActivity.this);
          RecommendAdapter mAdap = new RecommendAdapter(con, mLocation);
          mListview.setAdapter(mAdap);
  
          if (dialog.isShowing()) {
  
              dialog.dismiss();
          }
  
      }
  public static void hideSoftKeyboard(Activity activity) {
      InputMethodManager inputMethodManager = (InputMethodManager) activity
              .getSystemService(Activity.INPUT_METHOD_SERVICE);
      inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
  }
  </code></pre>