InputMethodManager.SetCurrentInputMethodSubtype(InputMethodSubtype) 方法

定义

切换到当前输入法的新输入法子类型。

[Android.Runtime.Register("setCurrentInputMethodSubtype", "(Landroid/view/inputmethod/InputMethodSubtype;)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.WRITE_SECURE_SETTINGS")]
public bool SetCurrentInputMethodSubtype (Android.Views.InputMethods.InputMethodSubtype? subtype);
[<Android.Runtime.Register("setCurrentInputMethodSubtype", "(Landroid/view/inputmethod/InputMethodSubtype;)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.WRITE_SECURE_SETTINGS")>]
member this.SetCurrentInputMethodSubtype : Android.Views.InputMethods.InputMethodSubtype -> bool

参数

subtype
InputMethodSubtype

要切换的新输入法子类型。

返回

如果已成功切换当前子类型,则为 true。 当指定的子类型为 null 时,此方法返回 false。

属性

注解

切换到当前输入法的新输入法子类型。

此成员已弃用。 如果调用进程是 IME,则使用 InputMethodService#switchInputMethod(String, InputMethodSubtype),只要调用方是当前 IME,就不需要任何权限。 如果调用进程是一些已具有 Manifest.permission#WRITE_SECURE_SETTINGS 权限的特权应用,只需直接更新 Settings.Secure#SELECTED_INPUT_METHOD_SUBTYPE

适用于 . 的 android.view.inputmethod.InputMethodManager.setCurrentInputMethodSubtype(android.view.inputmethod.InputMethodSubtype)Java 文档

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

适用于