title: How to develop NEXT Button in custom Android keyboard
body: <p>I am developing custom keyboard using by extend InputMethodService and implemented OnKeyboardActionListener. I am catching all the keyevent in a class where I am getting all the event of each keys and performing the action. </p>
  
  <pre><code>public class SimpleIME extends InputMethodService implements
      OnKeyboardActionListener {
  
  private KeyboardView kv;
  private Keyboard keyboard;
  private boolean caps = false;
  
  
  @Override
  public void onKey(int primaryCode, int[] keyCodes) {
      InputConnection ic = getCurrentInputConnection();
      playClick(primaryCode);
      switch(primaryCode){
      case Keyboard.KEYCODE_DELETE :
          ic.deleteSurroundingText(1, 0);
          break;
      case Keyboard.KEYCODE_SHIFT:
          caps = !caps;
          keyboard.setShifted(caps);
          kv.invalidateAllKeys();
          break;
      case Keyboard.KEYCODE_DONE:
          ic.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER));
          break;
      default:
          char code = (char)primaryCode;
          if(Character.isLetter(code) &amp;&amp; caps){
              code = Character.toUpperCase(code);
          }
          ic.commitText(String.valueOf(code),1);                  
      }
  }
  </code></pre>
  
  <p>My Querty.xml is:</p>
  
  <pre><code>&lt;Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
  android:horizontalGap="0px"
  android:keyHeight="60dp"
  android:keyWidth="10%p"
  android:verticalGap="0px" &gt;
  
  &lt;Row&gt;
      &lt;Key
          android:codes="81"
          android:keyEdgeFlags="left"
          android:keyLabel="Q" /&gt;
      &lt;Key
          android:codes="87"
          android:keyLabel="W" /&gt;
      &lt;Key
          android:codes="69"
          android:keyLabel="E" /&gt;
      &lt;Key
          android:codes="82"
          android:keyLabel="R" /&gt;
      &lt;Key
          android:codes="84"
          android:keyLabel="T" /&gt;
      &lt;Key
          android:codes="89"
          android:keyLabel="Y" /&gt;
      &lt;Key
          android:codes="85"
          android:keyLabel="U" /&gt;
      &lt;Key
          android:codes="73"
          android:keyLabel="I" /&gt;
      &lt;Key
          android:codes="79"
          android:keyLabel="O" /&gt;
      &lt;Key
          android:codes="80"
          android:keyLabel="P" /&gt;
  
  &lt;/Row&gt;
  &lt;Row&gt;
      &lt;Key
          android:codes="65"
          android:keyEdgeFlags="left"
          android:keyLabel="A" /&gt;
      &lt;Key
          android:codes="83"
          android:keyLabel="S" /&gt;
      &lt;Key
          android:codes="68"
          android:keyLabel="D" /&gt;
      &lt;Key
          android:codes="70"
          android:keyLabel="F" /&gt;
      &lt;Key
          android:codes="71"
          android:keyLabel="G" /&gt;
      &lt;Key
          android:codes="72"
          android:keyLabel="H" /&gt;
      &lt;Key
          android:codes="74"
          android:keyLabel="J" /&gt;
      &lt;Key
          android:codes="75"
          android:keyLabel="K" /&gt;
      &lt;Key
          android:codes="76"
          android:keyLabel="L" /&gt;
  
  &lt;/Row&gt;
  &lt;Row&gt;
      &lt;Key
          android:codes="-5"
          android:isRepeatable="true"
          android:keyEdgeFlags="left"
          android:keyLabel="DEL"
          android:keyWidth="20%p" /&gt;
      &lt;Key
          android:codes="90"
          android:keyLabel="Z" /&gt;
      &lt;Key
          android:codes="88"
          android:keyLabel="X" /&gt;
      &lt;Key
          android:codes="67"
          android:keyLabel="C" /&gt;
      &lt;Key
          android:codes="86"
          android:keyLabel="V" /&gt;
      &lt;Key
          android:codes="66"
          android:keyLabel="B" /&gt;
      &lt;Key
          android:codes="78"
          android:keyLabel="N" /&gt;
      &lt;Key
          android:codes="77"
          android:keyLabel="M" /&gt;
      &lt;Key
          android:codes="-4"
          android:isRepeatable="true"
          android:keyEdgeFlags="right"
          android:keyLabel="DONE"
          android:keyWidth="20%p" /&gt;
  &lt;/Row&gt;
  </code></pre>
  
  <p></p>
  
  <p>All are Ok. But I want ot use NEXT button in my keyboard instead of DONE button.
  I have used  android:imeOptions="actionNext", android:singleLine="true"
  in my XML.
  But I am not able to send cursor to next EditText.
  What I have to change ?</p>