Methods Summary |
---|
protected void | deleteText_internal(int start, int end){@inheritDoc}
// Do not call the super method.
// This will change the source TextView instead, which will update the ExtractTextView.
mIME.onExtractedDeleteText(start, end);
|
public void | finishInternalChanges()Finish making changes that will not be reported to the client. That
is, {@link #onSelectionChanged(int, int)} will not result in sending
the new selection to the client
mSettingExtractedText -= 1;
|
public boolean | hasFocus()Pretend like this view always has focus, so its
highlight and cursor will be displayed.
return this.isEnabled();
|
public boolean | hasVerticalScrollBar()Return true if the edit text is currently showing a scroll bar.
return computeVerticalScrollRange() > computeVerticalScrollExtent();
|
public boolean | hasWindowFocus()Pretend like the window this view is in always has focus, so its
highlight and cursor will be displayed.
return this.isEnabled();
|
public boolean | isFocused()Pretend like this view always has focus, so its
highlight and cursor will be displayed.
return this.isEnabled();
|
public boolean | isInputMethodTarget()We are always considered to be an input method target.
return true;
|
protected void | onSelectionChanged(int selStart, int selEnd)Report to the underlying text editor about selection changes.
if (mSettingExtractedText == 0 && mIME != null && selStart >= 0 && selEnd >= 0) {
mIME.onExtractedSelectionChanged(selStart, selEnd);
}
|
public boolean | onTextContextMenuItem(int id)
if (mIME != null && mIME.onExtractTextContextMenuItem(id)) {
// Mode was started on Extracted, needs to be stopped here.
// Cut and paste will change the text, which stops selection mode.
if (id == android.R.id.copy) stopSelectionActionMode();
return true;
}
return super.onTextContextMenuItem(id);
|
public boolean | performClick()Redirect clicks to the IME for handling there. First allows any
on click handler to run, though.
if (!super.performClick() && mIME != null) {
mIME.onExtractedTextClicked();
return true;
}
return false;
|
protected void | replaceText_internal(int start, int end, java.lang.CharSequence text){@inheritDoc}
// Do not call the super method.
// This will change the source TextView instead, which will update the ExtractTextView.
mIME.onExtractedReplaceText(start, end, text);
|
protected void | setCursorPosition_internal(int start, int end){@inheritDoc}
// Do not call the super method.
// This will change the source TextView instead, which will update the ExtractTextView.
mIME.onExtractedSelectionChanged(start, end);
|
public void | setExtractedText(android.view.inputmethod.ExtractedText text)Implement just to keep track of when we are setting text from the
client (vs. seeing changes in ourself from the user).
try {
mSettingExtractedText++;
super.setExtractedText(text);
} finally {
mSettingExtractedText--;
}
|
void | setIME(InputMethodService ime)
mIME = ime;
|
protected void | setSpan_internal(java.lang.Object span, int start, int end, int flags){@inheritDoc}
// Do not call the super method.
// This will change the source TextView instead, which will update the ExtractTextView.
mIME.onExtractedSetSpan(span, start, end, flags);
|
public void | startInternalChanges()Start making changes that will not be reported to the client. That
is, {@link #onSelectionChanged(int, int)} will not result in sending
the new selection to the client
mSettingExtractedText += 1;
|
protected void | viewClicked(android.view.inputmethod.InputMethodManager imm)
// As an instance of this class is supposed to be owned by IMS,
// and it has a reference to the IMS (the current IME),
// we just need to call back its onViewClicked() here.
// It should be good to avoid unnecessary IPCs by doing this as well.
if (mIME != null) {
mIME.onViewClicked(false);
}
|