语言

KeyCharacterMap.GetMatch 方法

定义

重载

名称 说明
GetMatch(Keycode, Char[], Int32)

获取第一个字符,该字符 chars 可由指定的键代码生成。 如果有多个选择,首选使用指定的元键修饰符状态生成的选项。

GetMatch(Keycode, Char[])

获取字符数组中可由指定键代码生成的第一个字符。

GetMatch(Keycode, Char[], MetaKeyStates)

获取字符数组中可由指定键代码生成的第一个字符。

GetMatch(Keycode, Char[], Int32)

获取第一个字符,该字符 chars 可由指定的键代码生成。 如果有多个选择,首选使用指定的元键修饰符状态生成的选项。

public char GetMatch(Android.Views.Keycode keyCode, char[] chars, int metaState);
member this.GetMatch : Android.Views.Keycode * char[] * int -> char

参数

keyCode
Keycode

密钥代码。

chars
Char[]

要与之匹配的字符数组。

metaState
Int32

值的组合 MetaKeyStates ,表示为整数。

返回

如果未找到匹配字符,则为 null 字符('\0')。

注解

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

GetMatch(Keycode, Char[])

获取字符数组中可由指定键代码生成的第一个字符。

[Android.Runtime.Register("getMatch", "(I[C)C", "GetGetMatch_IarrayCHandler")]
public virtual char GetMatch(Android.Views.Keycode keyCode, char[]? chars);
[<Android.Runtime.Register("getMatch", "(I[C)C", "GetGetMatch_IarrayCHandler")>]
abstract member GetMatch : Android.Views.Keycode * char[] -> char
override this.GetMatch : Android.Views.Keycode * char[] -> char

参数

keyCode
Keycode

键码。

chars
Char[]

要考虑的匹配字符的数组。

返回

匹配的关联字符,如果未匹配,则为 0。

特性

注解

获取字符数组中可由指定键代码生成的第一个字符。

这是一个方便函数,它返回的值与 #getMatch(int,char[],int) getMatch(keyCode, chars, 0).

适用于 . 的 android.view.KeyCharacterMap.getMatch(int, char[])Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

GetMatch(Keycode, Char[], MetaKeyStates)

获取字符数组中可由指定键代码生成的第一个字符。

[Android.Runtime.Register("getMatch", "(I[CI)C", "GetGetMatch_IarrayCIHandler")]
public virtual char GetMatch(Android.Views.Keycode keyCode, char[]? chars, Android.Views.MetaKeyStates metaState);
[<Android.Runtime.Register("getMatch", "(I[CI)C", "GetGetMatch_IarrayCIHandler")>]
abstract member GetMatch : Android.Views.Keycode * char[] * Android.Views.MetaKeyStates -> char
override this.GetMatch : Android.Views.Keycode * char[] * Android.Views.MetaKeyStates -> char

参数

keyCode
Keycode

密钥代码。

chars
Char[]

要考虑的匹配字符的数组。

metaState
MetaKeyStates

首选元键修饰符状态。

返回

匹配的关联字符,如果未匹配,则为 0。

特性

注解

获取字符数组中可由指定键代码生成的第一个字符。 如果有多个选择,首选使用指定的元键修饰符状态生成的选项。

适用于 . 的 android.view.KeyCharacterMap.getMatch(int, char[], int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于