Android keyboard enter button to keep keyboard visible
<p>I'd like for my enter key to complete an action <em>without</em> hiding the keyboard afterwards. Currently every time I enter something and press the enter button the EditText input is cleared to accept the next input, but as the keyboard disappears I have to click the EditText again so that the keyboard would appear again...</p>

<p>Right now this is on my layout:</p>

<pre><code>&lt;EditText
    android:id="@+id/etCommand"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:hint="@string/commandHint"
    android:inputType="textNoSuggestions"
    android:imeOptions="actionSend" &gt;
&lt;/EditText&gt;
</code></pre>

<p>And the code:</p>

<pre><code>etCommand = (EditText) findViewById(R.id.etCommand);
etCommand.setOnEditorActionListener(new TextView.OnEditorActionListener() {
    @Override
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        if (actionId == EditorInfo.IME_ACTION_SEND) {
            sendCommand();
        }
        return false;
    }
});
</code></pre>

<h1>EDIT</h1>

<p>As swayam suggested I had to return <code>true</code> inside <code>onEditorAction</code> so that the OS would think the action was handled and leave it alone.</p>
