跳转到相应内容

最常访问

最近访问

navigation
added in API level 3

android.view.inputmethod

Framework classes for interaction between views and input methods (such as soft keyboards). See InputMethodManager for an overview. In most cases the main classes here are not needed for most applications, since they are dealt with for you by TextView. When implementing a custom text editor, however, you will need to implement the InputConnection class to allow the current input method to interact with your view.

Interfaces

InputConnection The InputConnection interface is the communication channel from an InputMethod back to the application that is receiving its input. 
InputMethod The InputMethod interface represents an input method which can generate key events and text, such as digital, email addresses, CJK characters, other language characters, and etc., while handling various input events, and send the text back to the application that requests text input. 
InputMethod.SessionCallback  
InputMethodSession The InputMethodSession interface provides the per-client functionality of InputMethod that is safe to expose to applications. 
InputMethodSession.EventCallback  

Classes

BaseInputConnection Base class for implementors of the InputConnection interface, taking care of most of the common behavior for providing a connection to an Editable. 
CompletionInfo Information about a single text completion that an editor has reported to an input method. 
CorrectionInfo Information about a single text correction that an editor has reported to an input method. 
CursorAnchorInfo Positional information about the text insertion point and characters in the composition string. 
CursorAnchorInfo.Builder Builder for CursorAnchorInfo
EditorInfo An EditorInfo describes several attributes of a text editing object that an input method is communicating with (typically an EditText), most importantly the type of text content it contains and the current cursor position. 
ExtractedText Information about text that has been extracted for use by an input method. 
ExtractedTextRequest Description of what an input method would like from an application when extract text from its input editor. 
InputBinding Information given to an InputMethod about a client connecting to it. 
InputConnectionWrapper

Wrapper class for proxying calls to another InputConnection. 

InputContentInfo A container object with which input methods can send content files to the target application. 
InputMethodInfo This class is used to specify meta information of an input method. 
InputMethodManager Central system API to the overall input method framework (IMF) architecture, which arbitrates interaction between applications and the current input method. 
InputMethodSubtype This class is used to specify meta information of a subtype contained in an input method editor (IME). 
InputMethodSubtype.InputMethodSubtypeBuilder InputMethodSubtypeBuilder is a builder class of InputMethodSubtype. 
此网站会使用 Cookie 来存储您在此网站上指定的语言和显示选项偏好设置。

获取最新的 Android Developers 资讯和提示,助您在 Google Play 上取得成功。

* 必填字段

成功!

在微信上关注 Google Developers

要以浏览此网站吗?

您请求访问的是网页,但是您为此网站设置的语言偏好为

要更改您的语言偏好设置并以浏览此网站吗?如果以后您想要更改语言偏好设置,请使用每个页面底部的语言菜单。

该类需要 或更高的 API 级别

此文档已被隐藏,因为您为该文档选择的 API 级别是 。您可以使用左侧导航栏上方的选择器来更改文档的 API 级别。

要详细了解如何根据您的应用需求指定 API 级别,请参阅支持不同平台版本

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)