Most visited

Recently visited

Added in API level 3

InputBinding

public final class InputBinding
extends Object implements Parcelable

java.lang.Object
    android.view.inputmethod.InputBinding


有关连接到它的客户端的信息 InputMethod

摘要(Summary)

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<InputBinding> CREATOR

用于使这个类可以分类。

Public constructors

InputBinding(InputConnection conn, IBinder connToken, int uid, int pid)

构造函数。

InputBinding(InputConnection conn, InputBinding binding)

构造函数从现有的InputBinding获取新的本地输入连接接口。

公共方法(Public methods)

int describeContents()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。

InputConnection getConnection()

返回与应用程序交互的连接。

IBinder getConnectionToken()

将连接令牌返回给应用程序。

int getPid()

返回此绑定来自的进程ID。

int getUid()

返回与此绑定关联的客户端的用户标识。

String toString()

返回对象的字符串表示形式。

void writeToParcel(Parcel dest, int flags)

用于将此对象打包成 Parcel

继承方法(Inherited methods)

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 3
Creator<InputBinding> CREATOR

用于使这个类可以分类。

Public constructors

InputBinding

Added in API level 3
InputBinding (InputConnection conn, 
                IBinder connToken, 
                int uid, 
                int pid)

构造函数。

参数(Parameters)
conn InputConnection: The interface for communicating back with the application.
connToken IBinder: A remoteable token for communicating across processes.
uid int: The user id of the client of this binding.
pid int: The process id of where the binding came from.

InputBinding

Added in API level 3
InputBinding (InputConnection conn, 
                InputBinding binding)

构造函数从现有的InputBinding获取新的本地输入连接接口。

参数(Parameters)
conn InputConnection: The new connection interface.
binding InputBinding: Existing binding to copy.

公共方法(Public methods)

describeContents

Added in API level 3
int describeContents ()

描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。

返回(Returns)
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getConnection

Added in API level 3
InputConnection getConnection ()

返回与应用程序交互的连接。

返回(Returns)
InputConnection

getConnectionToken

Added in API level 3
IBinder getConnectionToken ()

将连接令牌返回给应用程序。 你不能直接使用它,它必须转换为InputConnection给你。

返回(Returns)
IBinder

getPid

Added in API level 3
int getPid ()

返回此绑定来自的进程ID。

返回(Returns)
int

getUid

Added in API level 3
int getUid ()

返回与此绑定关联的客户端的用户标识。

返回(Returns)
int

toString

Added in API level 3
String toString ()

返回对象的字符串表示形式。 通常, toString方法返回一个“文本表示”此对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

返回(Returns)
String a string representation of the object.

writeToParcel

Added in API level 3
void writeToParcel (Parcel dest, 
                int flags)

用于将此对象打包成 Parcel

参数(Parameters)
dest Parcel: The Parcel to be written.
flags int: The flags used for parceling.

Hooray!