android.view.inputmethod
Class BaseInputConnection

java.lang.Object
  extended by android.view.inputmethod.BaseInputConnection
All Implemented Interfaces:
InputConnection

public class BaseInputConnection
extends Object
implements InputConnection


Field Summary
 
Fields inherited from interface android.view.inputmethod.InputConnection
GET_EXTRACTED_TEXT_MONITOR, GET_TEXT_WITH_STYLES
 
Constructor Summary
BaseInputConnection(View targetView, boolean fullEditor)
           
 
Method Summary
 boolean beginBatchEdit()
           
 boolean clearMetaKeyStates(int states)
           
 boolean commitCompletion(CompletionInfo text)
           
 boolean commitCorrection(CorrectionInfo correctionInfo)
           
 boolean commitText(CharSequence text, int newCursorPosition)
           
 boolean deleteSurroundingText(int leftLength, int rightLength)
           
 boolean endBatchEdit()
           
 boolean finishComposingText()
           
static int getComposingSpanEnd(Spannable text)
           
static int getComposingSpanStart(Spannable text)
           
 int getCursorCapsMode(int reqModes)
           
 Editable getEditable()
           
 ExtractedText getExtractedText(ExtractedTextRequest request, int flags)
           
 CharSequence getSelectedText(int flags)
           
 CharSequence getTextAfterCursor(int length, int flags)
           
 CharSequence getTextBeforeCursor(int length, int flags)
           
 boolean performContextMenuAction(int id)
           
 boolean performEditorAction(int actionCode)
           
 boolean performPrivateCommand(String action, Bundle data)
           
static void removeComposingSpans(Spannable text)
           
 boolean reportFullscreenMode(boolean enabled)
           
 boolean sendKeyEvent(KeyEvent event)
           
 boolean setComposingRegion(int start, int end)
           
static void setComposingSpans(Spannable text)
           
 boolean setComposingText(CharSequence text, int newCursorPosition)
           
 boolean setSelection(int start, int end)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseInputConnection

public BaseInputConnection(View targetView,
                           boolean fullEditor)
Method Detail

removeComposingSpans

public static final void removeComposingSpans(Spannable text)

setComposingSpans

public static void setComposingSpans(Spannable text)

getComposingSpanStart

public static int getComposingSpanStart(Spannable text)

getComposingSpanEnd

public static int getComposingSpanEnd(Spannable text)

getEditable

public Editable getEditable()

beginBatchEdit

public boolean beginBatchEdit()
Specified by:
beginBatchEdit in interface InputConnection

endBatchEdit

public boolean endBatchEdit()
Specified by:
endBatchEdit in interface InputConnection

clearMetaKeyStates

public boolean clearMetaKeyStates(int states)
Specified by:
clearMetaKeyStates in interface InputConnection

commitCompletion

public boolean commitCompletion(CompletionInfo text)
Specified by:
commitCompletion in interface InputConnection

commitCorrection

public boolean commitCorrection(CorrectionInfo correctionInfo)
Specified by:
commitCorrection in interface InputConnection

commitText

public boolean commitText(CharSequence text,
                          int newCursorPosition)
Specified by:
commitText in interface InputConnection

deleteSurroundingText

public boolean deleteSurroundingText(int leftLength,
                                     int rightLength)
Specified by:
deleteSurroundingText in interface InputConnection

finishComposingText

public boolean finishComposingText()
Specified by:
finishComposingText in interface InputConnection

getCursorCapsMode

public int getCursorCapsMode(int reqModes)
Specified by:
getCursorCapsMode in interface InputConnection

getExtractedText

public ExtractedText getExtractedText(ExtractedTextRequest request,
                                      int flags)
Specified by:
getExtractedText in interface InputConnection

getTextBeforeCursor

public CharSequence getTextBeforeCursor(int length,
                                        int flags)
Specified by:
getTextBeforeCursor in interface InputConnection

getSelectedText

public CharSequence getSelectedText(int flags)
Specified by:
getSelectedText in interface InputConnection

getTextAfterCursor

public CharSequence getTextAfterCursor(int length,
                                       int flags)
Specified by:
getTextAfterCursor in interface InputConnection

performEditorAction

public boolean performEditorAction(int actionCode)
Specified by:
performEditorAction in interface InputConnection

performContextMenuAction

public boolean performContextMenuAction(int id)
Specified by:
performContextMenuAction in interface InputConnection

performPrivateCommand

public boolean performPrivateCommand(String action,
                                     Bundle data)
Specified by:
performPrivateCommand in interface InputConnection

setComposingText

public boolean setComposingText(CharSequence text,
                                int newCursorPosition)
Specified by:
setComposingText in interface InputConnection

setComposingRegion

public boolean setComposingRegion(int start,
                                  int end)
Specified by:
setComposingRegion in interface InputConnection

setSelection

public boolean setSelection(int start,
                            int end)
Specified by:
setSelection in interface InputConnection

sendKeyEvent

public boolean sendKeyEvent(KeyEvent event)
Specified by:
sendKeyEvent in interface InputConnection

reportFullscreenMode

public boolean reportFullscreenMode(boolean enabled)
Specified by:
reportFullscreenMode in interface InputConnection


Copyright © 2008-2012. All Rights Reserved.