title: android set hidden the keyboard on press enter (in a EditText)
body: <p>When my user press <kbd>Enter</kbd> on the virtual android "user validate entry!" keyboard my keyboard stay visible! (Why?)</p>
  
  <p>Here my Java code...</p>
  
  <pre><code>private void initTextField() {
      entryUser = (EditText) findViewById(R.id.studentEntrySalary);
      entryUser.setOnKeyListener(new OnKeyListener() {
          public boolean onKey(View v, int keyCode, KeyEvent event) {
              if (event.getAction() == KeyEvent.ACTION_DOWN) {
                  switch (keyCode) {
                      case KeyEvent.KEYCODE_DPAD_CENTER:
                      case KeyEvent.KEYCODE_ENTER:
                          userValidateEntry();
                          return true;
                  }
              }
  
            return true;
          }
      });
  }
  
  private void userValidateEntry() {
      System.out.println("user validate entry!");
  }
  </code></pre>
  
  <p>... here my View</p>
  
  <pre><code> &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;
              &lt;EditText android:id="@+id/studentEntrySalary" android:text="Foo" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt;
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Maybe something wrong on my virtual device?</p>