org.solovyev.android.keyboard
Class AbstractAndroidKeyboardController<K extends AKeyboard>

java.lang.Object
  extended by org.solovyev.android.keyboard.AbstractKeyboardController<K>
      extended by org.solovyev.android.keyboard.AbstractAndroidKeyboardController<K>
All Implemented Interfaces:
AKeyboardController
Direct Known Subclasses:
DragKeyboardController

public abstract class AbstractAndroidKeyboardController<K extends AKeyboard>
extends AbstractKeyboardController<K>

User: serso Date: 11/3/12 Time: 1:11 PM


Field Summary
 
Fields inherited from class org.solovyev.android.keyboard.AbstractKeyboardController
KEYCODE_CLEAR, KEYCODE_COPY, KEYCODE_CURSOR_LEFT, KEYCODE_CURSOR_RIGHT, KEYCODE_ENTER, KEYCODE_NEXT_KEYBOARD, KEYCODE_PASTE, KEYCODE_PREV_KEYBOARD, KEYCODE_REDO, KEYCODE_UNDO
 
Constructor Summary
AbstractAndroidKeyboardController()
           
 
Method Summary
protected abstract  AKeyboardViewWithSuggestions<K> createKeyboardView0(android.content.Context context)
           
 AKeyboardViewWithSuggestions<K> getKeyboardView()
           
 boolean handleBackspace()
           
 void handleClose()
           
 android.view.View onCreateCandidatesView()
          Called by the framework when your view for showing candidates needs to be generated, like AKeyboardController.createKeyboardView(android.content.Context, android.view.LayoutInflater).
 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 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 pickSuggestionManually(int index)
           
 void setSuggestions(List<String> suggestions, boolean completions, boolean typedWordValid)
           
protected  void updateCandidates()
          Update the list of available candidates from the current composing text.
 
Methods inherited from class org.solovyev.android.keyboard.AbstractKeyboardController
createKeyboardInput0, createKeyboardView, getCurrentKeyboard, getInputMethodService, getKeyboardInput, getState, handleCharacter, handleModeChange, handleNextKeyboard, handlePrevKeyboard, handleSpecialKey, isWordSeparator, keyDownUp, onCreate, onCreate0, onCurrentInputMethodSubtypeChanged, onInitializeInterface, onInitializeInterface0, onKey, onKeyDown, onKeyUp, onStartInput0, onStartInputView, onText, onUpdateSelection, pickDefaultCandidate, sendKey, setCurrentKeyboard, setShifted, setShifted0, setState, updateShiftKeyState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAndroidKeyboardController

public AbstractAndroidKeyboardController()
Method Detail

onStartInput

public void onStartInput(@Nonnull
                         android.view.inputmethod.EditorInfo attribute,
                         boolean restarting)
Description copied from interface: AKeyboardController
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.

Specified by:
onStartInput in interface AKeyboardController
Overrides:
onStartInput in class AbstractKeyboardController<K extends AKeyboard>

getKeyboardView

@Nonnull
public AKeyboardViewWithSuggestions<K> getKeyboardView()
Overrides:
getKeyboardView in class AbstractKeyboardController<K extends AKeyboard>

onFinishInput

public void onFinishInput()
Description copied from interface: AKeyboardController
This is called when the user is done editing a field. We can use this to reset our state.

Specified by:
onFinishInput in interface AKeyboardController
Overrides:
onFinishInput in class AbstractKeyboardController<K extends AKeyboard>

handleBackspace

public boolean handleBackspace()
Specified by:
handleBackspace in interface AKeyboardController
Overrides:
handleBackspace in class AbstractKeyboardController<K extends AKeyboard>

createKeyboardView0

@Nonnull
protected abstract AKeyboardViewWithSuggestions<K> createKeyboardView0(@Nonnull
                                                                               android.content.Context context)
Specified by:
createKeyboardView0 in class AbstractKeyboardController<K extends AKeyboard>

setSuggestions

public void setSuggestions(@Nonnull
                           List<String> suggestions,
                           boolean completions,
                           boolean typedWordValid)

onDisplayCompletions

public void onDisplayCompletions(@Nullable
                                 android.view.inputmethod.CompletionInfo[] completions)
Description copied from interface: AKeyboardController
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.

Specified by:
onDisplayCompletions in interface AKeyboardController
Overrides:
onDisplayCompletions in class AbstractKeyboardController<K extends AKeyboard>

updateCandidates

protected void updateCandidates()
Update the list of available candidates from the current composing text. This will need to be filled in by however you are determining candidates.

Overrides:
updateCandidates in class AbstractKeyboardController<K extends AKeyboard>

handleClose

public void handleClose()
Specified by:
handleClose in interface AKeyboardController
Overrides:
handleClose in class AbstractKeyboardController<K extends AKeyboard>

pickSuggestionManually

public void pickSuggestionManually(int index)
Specified by:
pickSuggestionManually in interface AKeyboardController
Overrides:
pickSuggestionManually in class AbstractKeyboardController<K extends AKeyboard>

onCreateCandidatesView

public android.view.View onCreateCandidatesView()
Description copied from interface: AKeyboardController
Called by the framework when your view for showing candidates needs to be generated, like AKeyboardController.createKeyboardView(android.content.Context, android.view.LayoutInflater).

Specified by:
onCreateCandidatesView in interface AKeyboardController
Overrides:
onCreateCandidatesView in class AbstractKeyboardController<K extends AKeyboard>


Copyright © 2013. All Rights Reserved.