|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.solovyev.android.keyboard.AbstractKeyboardController<K>
public abstract class AbstractKeyboardController<K extends AKeyboard>
User: Solovyev_S Date: 02.11.12 Time: 11:33
| Field Summary | |
|---|---|
static int |
KEYCODE_CLEAR
|
static int |
KEYCODE_COPY
|
static int |
KEYCODE_CURSOR_LEFT
|
static int |
KEYCODE_CURSOR_RIGHT
|
static int |
KEYCODE_ENTER
|
static int |
KEYCODE_NEXT_KEYBOARD
|
static int |
KEYCODE_PASTE
|
static int |
KEYCODE_PREV_KEYBOARD
|
static int |
KEYCODE_REDO
|
static int |
KEYCODE_UNDO
|
| Constructor Summary | |
|---|---|
protected |
AbstractKeyboardController()
|
| Method Summary | |
|---|---|
protected DefaultKeyboardInput |
createKeyboardInput0(android.inputmethodservice.InputMethodService inputMethodService)
|
AKeyboardView |
createKeyboardView(android.content.Context context,
android.view.LayoutInflater layoutInflater)
Called by the framework when your view for creating input needs to be generated. |
protected abstract AKeyboardView<K> |
createKeyboardView0(android.content.Context context)
|
protected K |
getCurrentKeyboard()
|
protected android.inputmethodservice.InputMethodService |
getInputMethodService()
|
protected AKeyboardInput |
getKeyboardInput()
|
protected AKeyboardView<K> |
getKeyboardView()
|
protected AKeyboardControllerState<K> |
getState()
|
boolean |
handleBackspace()
|
protected void |
handleCharacter(int primaryCode,
int[] keyCodes)
|
void |
handleClose()
|
protected void |
handleModeChange()
|
protected void |
handleNextKeyboard()
|
protected void |
handlePrevKeyboard()
|
protected boolean |
handleSpecialKey(int primaryCode)
|
boolean |
isWordSeparator(int code)
|
void |
keyDownUp(int keyEventCode)
Helper to send a key down / key up pair to the current editor. |
void |
onCreate(android.content.Context context)
Main initialization of the input method component. |
protected abstract AKeyboardConfiguration |
onCreate0(android.content.Context context)
|
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 |
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. |
protected abstract AKeyboardControllerState<K> |
onInitializeInterface0(android.inputmethodservice.InputMethodService inputMethodService)
|
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. |
abstract AKeyboardControllerState<K> |
onStartInput0(android.view.inputmethod.EditorInfo attribute,
boolean restarting)
|
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)
|
void |
sendKey(int keyCode)
Helper to send a character to the editor as raw key events. |
protected void |
setCurrentKeyboard(K keyboard)
|
protected void |
setShifted(boolean shifted)
|
protected void |
setShifted0(boolean shifted)
|
protected void |
setState(AKeyboardControllerState<K> state)
|
protected void |
updateCandidates()
|
void |
updateShiftKeyState(android.view.inputmethod.EditorInfo attr)
Helper to update the shift state of our keyboard based on the initial editor state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEYCODE_CLEAR
public static final int KEYCODE_COPY
public static final int KEYCODE_ENTER
public static final int KEYCODE_PASTE
public static final int KEYCODE_CURSOR_LEFT
public static final int KEYCODE_CURSOR_RIGHT
public static final int KEYCODE_PREV_KEYBOARD
public static final int KEYCODE_NEXT_KEYBOARD
public static final int KEYCODE_UNDO
public static final int KEYCODE_REDO
| Constructor Detail |
|---|
protected AbstractKeyboardController()
| Method Detail |
|---|
public final void onCreate(@Nonnull
android.content.Context context)
AKeyboardController
onCreate in interface AKeyboardController
@Nonnull
protected abstract AKeyboardConfiguration onCreate0(@Nonnull
android.content.Context context)
public final void onInitializeInterface(@Nonnull
android.inputmethodservice.InputMethodService inputMethodService)
AKeyboardController
onInitializeInterface in interface AKeyboardController
@Nonnull
protected abstract AKeyboardControllerState<K> onInitializeInterface0(@Nonnull
android.inputmethodservice.InputMethodService inputMethodService)
@Nonnull
protected DefaultKeyboardInput createKeyboardInput0(@Nonnull
android.inputmethodservice.InputMethodService inputMethodService)
@Nonnull
protected abstract AKeyboardView<K> createKeyboardView0(@Nonnull
android.content.Context context)
@Nonnull
public final AKeyboardView createKeyboardView(@Nonnull
android.content.Context context,
@Nonnull
android.view.LayoutInflater layoutInflater)
AKeyboardController
createKeyboardView in interface AKeyboardControllerpublic android.view.View onCreateCandidatesView()
AKeyboardControllerAKeyboardController.createKeyboardView(android.content.Context, android.view.LayoutInflater).
onCreateCandidatesView in interface AKeyboardController
public void onStartInput(@Nonnull
android.view.inputmethod.EditorInfo attribute,
boolean restarting)
AKeyboardController
onStartInput in interface AKeyboardControllerpublic void onFinishInput()
AKeyboardController
onFinishInput in interface AKeyboardController
public void onStartInputView(android.view.inputmethod.EditorInfo attribute,
boolean restarting)
onStartInputView in interface AKeyboardController@Nonnull protected android.inputmethodservice.InputMethodService getInputMethodService()
public final boolean onKey(int primaryCode,
@Nullable
int[] keyCodes)
onKey in interface AKeyboardControllerprotected boolean handleSpecialKey(int primaryCode)
protected void handleModeChange()
protected void handleNextKeyboard()
protected void handlePrevKeyboard()
protected final void setShifted(boolean shifted)
protected void setShifted0(boolean shifted)
@Nonnull protected K getCurrentKeyboard()
protected void setCurrentKeyboard(@Nonnull
K keyboard)
@Nonnull protected AKeyboardControllerState<K> getState()
protected void setState(@Nonnull
AKeyboardControllerState<K> state)
@Nonnull protected AKeyboardView<K> getKeyboardView()
@Nonnull protected AKeyboardInput getKeyboardInput()
public void handleClose()
handleClose in interface AKeyboardController
@Nonnull
public abstract AKeyboardControllerState<K> onStartInput0(@Nonnull
android.view.inputmethod.EditorInfo attribute,
boolean restarting)
public void onText(@Nullable
CharSequence text)
onText in interface AKeyboardController
public void onDisplayCompletions(@Nullable
android.view.inputmethod.CompletionInfo[] completions)
AKeyboardController
onDisplayCompletions in interface AKeyboardController
public void updateShiftKeyState(@Nullable
android.view.inputmethod.EditorInfo attr)
public void onUpdateSelection(int oldSelStart,
int oldSelEnd,
int newSelStart,
int newSelEnd,
int candidatesStart,
int candidatesEnd)
AKeyboardController
onUpdateSelection in interface AKeyboardControllerprotected void updateCandidates()
public boolean onKeyDown(int keyCode,
@Nonnull
android.view.KeyEvent event)
AKeyboardController
onKeyDown in interface AKeyboardControllerpublic boolean handleBackspace()
handleBackspace in interface AKeyboardControllerpublic void keyDownUp(int keyEventCode)
public boolean onKeyUp(int keyCode,
android.view.KeyEvent event)
AKeyboardController
onKeyUp in interface AKeyboardControllerpublic void sendKey(int keyCode)
public void pickDefaultCandidate()
pickDefaultCandidate in interface AKeyboardControllerpublic void pickSuggestionManually(int index)
pickSuggestionManually in interface AKeyboardController
protected void handleCharacter(int primaryCode,
int[] keyCodes)
public void onCurrentInputMethodSubtypeChanged(@Nonnull
android.view.inputmethod.InputMethodSubtype subtype)
onCurrentInputMethodSubtypeChanged in interface AKeyboardControllerpublic boolean isWordSeparator(int code)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||