public class

ExtractEditText

extends EditText
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.TextView
       ↳ android.widget.EditText
         ↳ android.inputmethodservice.ExtractEditText

Class Overview

Specialization of EditText for showing and interacting with the extracted text in a full-screen input method.

Summary

[Expand]
Inherited XML Attributes
From class android.widget.TextView
From class android.view.View
[Expand]
Inherited Constants
From class android.view.View
Public Constructors
ExtractEditText(Context context)
ExtractEditText(Context context, AttributeSet attrs)
ExtractEditText(Context context, AttributeSet attrs, int defStyle)
Public Methods
void finishInternalChanges()
Finish making changes that will not be reported to the client.
boolean hasFocus()
Pretend like this view always has focus, so its highlight and cursor will be displayed.
boolean hasVerticalScrollBar()
Return true if the edit text is currently showing a scroll bar.
boolean hasWindowFocus()
Pretend like the window this view is in always has focus, so its highlight and cursor will be displayed.
boolean isFocused()
Pretend like this view always has focus, so its highlight and cursor will be displayed.
boolean isInputMethodTarget()
We are always considered to be an input method target.
boolean onTextContextMenuItem(int id)
Called when a context menu option for the text view is selected.
boolean performClick()
Redirect clicks to the IME for handling there.
void setExtractedText(ExtractedText text)
Implement just to keep track of when we are setting text from the client (vs.
void startInternalChanges()
Start making changes that will not be reported to the client.
Protected Methods
void onSelectionChanged(int selStart, int selEnd)
Report to the underlying text editor about selection changes.
[Expand]
Inherited Methods
From class android.widget.EditText
From class android.widget.TextView
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewTreeObserver.OnPreDrawListener

Public Constructors

public ExtractEditText (Context context)

public ExtractEditText (Context context, AttributeSet attrs)

public ExtractEditText (Context context, AttributeSet attrs, int defStyle)

Public Methods

public void finishInternalChanges ()

Finish making changes that will not be reported to the client. That is, onSelectionChanged(int, int) will not result in sending the new selection to the client

public boolean hasFocus ()

Pretend like this view always has focus, so its highlight and cursor will be displayed.

Returns
  • True if this view has or contains focus, false otherwise.

public boolean hasVerticalScrollBar ()

Return true if the edit text is currently showing a scroll bar.

public boolean hasWindowFocus ()

Pretend like the window this view is in always has focus, so its highlight and cursor will be displayed.

Returns
  • True if this view is in a window that currently has window focus.

public boolean isFocused ()

Pretend like this view always has focus, so its highlight and cursor will be displayed.

Returns
  • True if this view has focus, false otherwise.

public boolean isInputMethodTarget ()

We are always considered to be an input method target.

public boolean onTextContextMenuItem (int id)

Called when a context menu option for the text view is selected. Currently this will be one of: selectAll, startSelectingText, stopSelectingText, cut, copy, paste, copyUrl, or switchInputMethod.

public boolean performClick ()

Redirect clicks to the IME for handling there. First allows any on click handler to run, though.

Returns
  • True there was an assigned OnClickListener that was called, false otherwise is returned.

public void setExtractedText (ExtractedText text)

Implement just to keep track of when we are setting text from the client (vs. seeing changes in ourself from the user).

public void startInternalChanges ()

Start making changes that will not be reported to the client. That is, onSelectionChanged(int, int) will not result in sending the new selection to the client

Protected Methods

protected void onSelectionChanged (int selStart, int selEnd)

Report to the underlying text editor about selection changes.

Parameters
selStart The new selection start location.
selEnd The new selection end location.