title: How to hide Soft Keyboard when activity starts
body: <p>I have an Edittext with <code>android:windowSoftInputMode="stateVisible"</code> in Manifest. Now the keyboard will be shown when I start the activity. How to hide it? I cannot use <code>android:windowSoftInputMode="stateHidden</code> because when keyboard is visible then minimize the app and resume it the keyboard should be visible. 
  I tried with </p>
  
  <p><code>InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
              imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);</code></p>
  
  <p>but it did not work.</p>