title: How to show virtual keypad in an android activity
body: <p>Why am i not able to show the virtual keyboard in my activity. Here is my code:   </p>
  
  <p>package som.android.keypad;</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  import android.view.inputmethod.InputMethodManager;
  import android.widget.EditText;
  
  public class ShowKeypad extends Activity {
      InputMethodManager imm;
  
      @Override
      public void onCreate(Bundle icicle) {
  
      super.onCreate(icicle); 
      EditText editText = (EditText)findViewById(R.id.EditText);
  
      ((InputMethodManager) getSystemService(this.INPUT_METHOD_SERVICE)).showSoftInput(editText, 0); 
  
  
  
      }
  
  }
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="som.android.keypad"
        android:versionCode="1"
        android:versionName="1.0"&gt;
      &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
          &lt;activity android:name=".ShowKeypad"
                    android:windowSoftInputMode="stateAlwaysVisible"  
                    android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
      &lt;uses-sdk android:minSdkVersion="4" /&gt;
  
  &lt;/manifest&gt; 
  </code></pre>