Android APIs
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
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
ExtractEditText(Context context)
ExtractEditText(Context context, AttributeSet attrs)
ExtractEditText(Context context, AttributeSet attrs, int defStyleAttr)
ExtractEditText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
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
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public ExtractEditText (Context context)

Added in API level 3

public ExtractEditText (Context context, AttributeSet attrs)

Added in API level 3

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

Added in API level 3

public ExtractEditText (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void finishInternalChanges ()

Added in API level 3

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 ()

Added in API level 3

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 ()

Added in API level 3

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

public boolean hasWindowFocus ()

Added in API level 3

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 ()

Added in API level 3

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 ()

Added in API level 3

We are always considered to be an input method target.

public boolean onTextContextMenuItem (int id)

Added in API level 3

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

Returns
  • true if the context menu item action was performed.

public boolean performClick ()

Added in API level 3

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)

Added in API level 3

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 ()

Added in API level 3

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)

Added in API level 3

Report to the underlying text editor about selection changes.

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