Code example for InputConnection

Methods: setComposingText

  public boolean setComposingText(CharSequence text, int newCursorPosition) {
    composingText = text == null ? "" : text.toString();
    return baseConnection.setComposingText(text, newCursorPosition);
  public boolean setSelection(int start, int end) {
    return baseConnection.setSelection(start, end);
   * Returns the instance of ComposingTextTrackingInputConnection based on the given baseConnection. 
   * This method will return: 
   * - {@code null}, if the given connection is {@code null}. 
   * - the given connection instance as is, if it is the instance of 
   *   ComposingTextTrackingInputConnection. 
   * - the new instance of ComposingTextTrackingInputConnection wrapping baseConnection, otherwise. 
Connect your IDE to all the code out there  Get Codota for Java