title: How to force keyboard to show/hide?
body: <p>I tried to show keyboard after I inflate LinearLayout and call setContentView like:</p>
  
  <pre><code>InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
  mgr.showSoftInput(etContent, InputMethodManager.SHOW_FORCED);
  getContent.requestFocus();
  </code></pre>
  
  <p>It didn't work. I also tried this:</p>
  
  <pre><code>getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
  </code></pre>
  
  <p>But it also didn't work. How can I force the keyboard to show/hide? What did I do wrong?</p>