Most visited

Recently visited

Added in API level 3

ExtractEditText

public class ExtractEditText
extends EditText

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


专业化 EditText用于以全屏幕输入法显示和交互提取的文本。

Summary

Inherited XML attributes

From class android.widget.TextView
From class android.view.View

Inherited constants

From class android.view.View

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

完成不会向客户报告的更改。

boolean hasFocus()

假装像这个视图总是有焦点,所以它的高光和光标会显示出来。

boolean hasVerticalScrollBar()

如果编辑文本当前正在显示滚动条,则返回true。

boolean hasWindowFocus()

假装这个视图总是有焦点,所以它的高光和光标将被显示。

boolean isFocused()

假装像这个视图总是有焦点,所以它的高光和光标会显示出来。

boolean isInputMethodTarget()

我们一直被认为是输入法的目标。

boolean onTextContextMenuItem(int id)

当选择文本视图的上下文菜单选项时调用。

boolean performClick()

将点击重定向到IME以在那里处理。

void setExtractedText(ExtractedText text)

实施只是为了跟踪我们从客户端设置文本的时间(vs.

void startInternalChanges()

开始进行不会向客户报告的更改。

Protected methods

void onSelectionChanged(int selStart, int selEnd)

向底层文本编辑器报告选择更改。

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.view.ViewTreeObserver.OnPreDrawListener
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

ExtractEditText

Added in API level 3
ExtractEditText (Context context)

Parameters
context Context

ExtractEditText

Added in API level 3
ExtractEditText (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

ExtractEditText

Added in API level 3
ExtractEditText (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context
attrs AttributeSet
defStyleAttr int

ExtractEditText

Added in API level 21
ExtractEditText (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)

Parameters
context Context
attrs AttributeSet
defStyleAttr int
defStyleRes int

Public methods

finishInternalChanges

Added in API level 3
void finishInternalChanges ()

完成不会向客户报告的更改。 也就是说, onSelectionChanged(int, int)不会导致将新选择发送给客户端

hasFocus

Added in API level 3
boolean hasFocus ()

假装像这个视图总是有焦点,所以它的高光和光标会显示出来。

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

hasVerticalScrollBar

Added in API level 3
boolean hasVerticalScrollBar ()

如果编辑文本当前正在显示滚动条,则返回true。

Returns
boolean

hasWindowFocus

Added in API level 3
boolean hasWindowFocus ()

假装这个视图总是有焦点,所以它的高光和光标将被显示。

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

isFocused

Added in API level 3
boolean isFocused ()

假装像这个视图总是有焦点,所以它的高光和光标会显示出来。

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

isInputMethodTarget

Added in API level 3
boolean isInputMethodTarget ()

我们一直被认为是输入法的目标。

Returns
boolean

onTextContextMenuItem

Added in API level 3
boolean onTextContextMenuItem (int id)

当选择文本视图的上下文菜单选项时调用。 目前,这将是一个selectAllcutcopypaste或者shareText

Parameters
id int
Returns
boolean true if the context menu item action was performed.

performClick

Added in API level 3
boolean performClick ()

将点击重定向到IME以在那里处理。 首先允许任何点击处理程序运行,但。

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

setExtractedText

Added in API level 3
void setExtractedText (ExtractedText text)

实施只是为了跟踪我们从客户端设置文本的时间(与从用户处看到我们自己的变化)。

Parameters
text ExtractedText

startInternalChanges

Added in API level 3
void startInternalChanges ()

开始进行不会向客户报告的更改。 也就是说, onSelectionChanged(int, int)不会导致将新选择发送给客户端

Protected methods

onSelectionChanged

Added in API level 3
void onSelectionChanged (int selStart, 
                int selEnd)

向底层文本编辑器报告选择更改。

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

Hooray!