org.solovyev.android.keyboard
Interface AKeyboardController

All Known Implementing Classes:
AbstractAndroidKeyboardController, AbstractKeyboardController, CalculatorKeyboardController, DragKeyboardController, LatinDragKeyboardController, MapKeyboardController

public interface AKeyboardController

User: serso Date: 11/1/12 Time: 8:07 PM


Method Summary
 AKeyboardView createKeyboardView(android.content.Context context, android.view.LayoutInflater layoutInflater)
          Called by the framework when your view for creating input needs to be generated.
 boolean handleBackspace()
           
 void handleClose()
           
 void onCreate(android.content.Context context)
          Main initialization of the input method component.
 android.view.View onCreateCandidatesView()
          Called by the framework when your view for showing candidates needs to be generated, like createKeyboardView(android.content.Context, android.view.LayoutInflater).
 void onCurrentInputMethodSubtypeChanged(android.view.inputmethod.InputMethodSubtype subtype)
           
 void onDisplayCompletions(android.view.inputmethod.CompletionInfo[] completions)
          This tells us about completions that the editor has determined based on the current text in it.
 void onFinishInput()
          This is called when the user is done editing a field.
 void onInitializeInterface(android.inputmethodservice.InputMethodService inputMethodService)
          This is the point where you can do all of your UI initialization.
 boolean onKey(int primaryCode, int[] keyCodes)
           
 boolean onKeyDown(int keyCode, android.view.KeyEvent event)
          Use this to monitor key events being delivered to the application.
 boolean onKeyUp(int keyCode, android.view.KeyEvent event)
          Use this to monitor key events being delivered to the application.
 void onStartInput(android.view.inputmethod.EditorInfo attribute, boolean restarting)
          This is the main point where we do our initialization of the input method to begin operating on an application.
 void onStartInputView(android.view.inputmethod.EditorInfo attribute, boolean restarting)
           
 void onText(CharSequence text)
           
 void onUpdateSelection(int oldSelStart, int oldSelEnd, int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd)
          Deal with the editor reporting movement of its cursor.
 void pickDefaultCandidate()
           
 void pickSuggestionManually(int index)
           
 

Method Detail

onCreate

void onCreate(@Nonnull
              android.content.Context context)
Main initialization of the input method component. Be sure to call to super class.


onInitializeInterface

void onInitializeInterface(@Nonnull
                           android.inputmethodservice.InputMethodService inputMethodService)
This is the point where you can do all of your UI initialization. It is called after creation and any configuration change.


createKeyboardView

@Nonnull
AKeyboardView createKeyboardView(@Nonnull
                                         android.content.Context context,
                                         @Nonnull
                                         android.view.LayoutInflater layoutInflater)
Called by the framework when your view for creating input needs to be generated. This will be called the first time your input method is displayed, and every time it needs to be re-created such as due to a configuration change.


onCreateCandidatesView

@Nullable
android.view.View onCreateCandidatesView()
Called by the framework when your view for showing candidates needs to be generated, like createKeyboardView(android.content.Context, android.view.LayoutInflater).


onStartInput

void onStartInput(@Nonnull
                  android.view.inputmethod.EditorInfo attribute,
                  boolean restarting)
This is the main point where we do our initialization of the input method to begin operating on an application. At this point we have been bound to the client, and are now receiving all of the detailed information about the target of our edits.


onFinishInput

void onFinishInput()
This is called when the user is done editing a field. We can use this to reset our state.


onUpdateSelection

void onUpdateSelection(int oldSelStart,
                       int oldSelEnd,
                       int newSelStart,
                       int newSelEnd,
                       int candidatesStart,
                       int candidatesEnd)
Deal with the editor reporting movement of its cursor.


onDisplayCompletions

void onDisplayCompletions(@Nullable
                          android.view.inputmethod.CompletionInfo[] completions)
This tells us about completions that the editor has determined based on the current text in it. We want to use this in fullscreen mode to show the completions ourself, since the editor can not be seen in that situation.


onKeyDown

boolean onKeyDown(int keyCode,
                  android.view.KeyEvent event)
Use this to monitor key events being delivered to the application. We get first crack at them, and can either resume them or let them continue to the app.


onKeyUp

boolean onKeyUp(int keyCode,
                android.view.KeyEvent event)
Use this to monitor key events being delivered to the application. We get first crack at them, and can either resume them or let them continue to the app.


onCurrentInputMethodSubtypeChanged

void onCurrentInputMethodSubtypeChanged(@Nonnull
                                        android.view.inputmethod.InputMethodSubtype subtype)

onStartInputView

void onStartInputView(android.view.inputmethod.EditorInfo attribute,
                      boolean restarting)

onKey

boolean onKey(int primaryCode,
              @Nullable
              int[] keyCodes)

handleClose

void handleClose()

handleBackspace

boolean handleBackspace()

onText

void onText(@Nullable
            CharSequence text)

pickDefaultCandidate

void pickDefaultCandidate()

pickSuggestionManually

void pickSuggestionManually(int index)


Copyright © 2013. All Rights Reserved.