InputMethodService 类

定义

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

[Android.Runtime.Register("android/inputmethodservice/InputMethodService", DoNotGenerateAcw=true)]
public class InputMethodService : Android.InputMethodServices.AbstractInputMethodService
[<Android.Runtime.Register("android/inputmethodservice/InputMethodService", DoNotGenerateAcw=true)>]
type InputMethodService = class
    inherit AbstractInputMethodService
继承
属性

注解

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。 有关编写输入法的基础知识的详细信息,InputMethod请参阅基类AbstractInputMethodService和接口。

除了正常的服务生命周期方法,此类还引入了一些新的特定回调,大多数子类都希望使用这些回调:

<用于用户界面初始化的 ul><li>#onInitializeInterface() ,尤其是在服务运行时处理配置更改。 <li>#onBindInput 了解如何切换到新客户端。 <li>#onStartInput 处理从客户端开始的输入会话。 <li>#onCreateInputView()#onCreateCandidatesView()以及 #onCreateExtractTextView() 用于 UI 的非需求生成。 <li>#onStartInputView(EditorInfo, boolean) 处理输入,从 IME 的输入区域开始。 </ul>

输入法对其工作方式具有重大自由裁量权: android.inputmethodservice.InputMethodService 为标准 UI 元素(输入视图、候选视图和全屏模式运行)提供基本框架,但由特定实现者决定如何使用它们。 例如,一个输入法可以使用键盘实现输入区域,另一种输入法允许用户绘制文本,而第三个输入区域(因此对用户不可见),而是侦听音频并执行文本到语音转换。

在此处提供的实现中,所有这些元素都放在由 InputMethodService 管理的单个窗口中。 它将执行回调,因为它需要有关回调的信息,并提供 API 以编程方式控制它们。 显式定义了这些元素的布局:

<ul><li>软输入视图(如果可用)放置在屏幕底部。 <li>候选视图(如果当前显示)放置在软输入视图上方。 <li>如果未运行全屏,应用程序将被移动或调整为高于这些视图;如果运行全屏,窗口将完全覆盖应用程序,其顶部部分将包含应用程序当前正在编辑的内容的提取文本。 </ul>

“SoftInputView”><h3>软输入视图</h3>

大多数输入方法的核心是软输入视图。 这是大多数用户交互发生的地方:按软键、绘图字符,或者输入方法想要生成文本。 大多数实现只需有自己的视图即可完成所有这些工作,并在调用时 #onCreateInputView() 返回它的新实例。 此时,只要输入视图可见,你就会在该视图中看到用户交互,并可以回调 InputMethodService,以便根据需要与应用程序交互。

在某些情况下,你希望决定是否应向用户显示软输入视图。 为此,应实现 #onEvaluateInputViewShown() 返回 true 还是 false,具体取决于它是否应在当前环境中显示。 如果任何状态发生更改,可能会影响此情况,请调用 #updateInputViewShown() 重新评估它。 默认实现始终显示输入视图,除非有硬键盘可用,这是大多数输入方法的适当行为。

“CandidatesView”><h3>候选项视图</h3>

通常,当用户生成原始文本时,输入方法希望向他们提供该文本的可能解释列表,这些解释可供使用。 这是通过候选视图完成的,就像实现 #onCreateCandidatesView() 的软输入视图一样,用于实例化实现候选 UI 的自己的视图。

候选视图的管理与输入视图略有不同,因为候选视图往往更暂时性,仅当用户可能输入当前文本的候选项时才会显示。 若要控制是否显示候选视图,请使用 #setCandidatesViewShown(boolean)。 请注意,由于候选视图往往显示和隐藏很多,因此它不会影响应用程序 UI,其方式与软输入视图相同:它永远不会导致应用程序窗口调整大小,只会导致用户看到当前焦点时将其平移。

“FullscreenMode”><h3>全屏模式</h3>

有时输入法 UI 太大,无法与应用程序 UI 集成,因此你只想接管屏幕。 这是通过切换到全屏模式来实现的,导致输入法窗口填充整个屏幕,并添加其自己的“提取的文本”编辑器,向用户显示正在键入的文本。 与其他 UI 元素不同,提取编辑器有一个标准实现,不需要更改。 编辑器位于 IME 顶部,位于输入视图和候选视图上方。

与输入视图类似,你可以根据当前环境中的全屏模式实现 #onEvaluateFullscreenMode() 返回 true 还是 false 来控制 IME 是否在全屏模式下运行。 如果任何状态发生更改,可能会影响此情况,请调用 #updateFullscreenMode() 重新评估它。 当屏幕处于横向方向时,默认实现会选择全屏模式,对于具有重要输入区域的大多数输入方法来说,这是适当的行为。

当处于全屏模式时,你有一些特殊要求,因为用户看不到应用程序 UI。 具体而言,应实现 #onDisplayCompletions(CompletionInfo[]) 以显示应用程序生成的完成情况,通常在候选视图中,就像平时显示候选项一样。

“生成文本”><h3>生成文本</h3>

IME 的关键部分当然是为应用程序生成文本。 这是通过对应用程序的接口的调用 android.view.inputmethod.InputConnection 完成的,可以从中检索 #getCurrentInputConnection()。 此接口允许生成原始键事件,或者目标支持它,直接在候选字符串和已提交文本中编辑。

可以通过使用方法检索#getCurrentInputEditorInfo()android.view.inputmethod.EditorInfo类找到目标的预期和支持的信息。 其中最重要的部分是 android.view.inputmethod.EditorInfo#inputType EditorInfo.inputType;特别是,如果是 android.view.inputmethod.EditorInfo#TYPE_NULL EditorInfo.TYPE_NULL这样,则目标不支持复杂的编辑,并且只需将原始密钥事件传递给它。 输入方法还需要在此处查看其他值,例如检测密码模式、自动完成文本视图、电话号码输入等。

当用户在输入目标之间切换时,你将收到呼叫 #onFinishInput()#onStartInput(EditorInfo, boolean)。 可以使用这些设置重置和初始化当前目标的输入状态。 例如,通常需要清除任何输入状态,并更新软键盘以适合新的 inputType。

适用于 . 的 android.inputmethodservice.InputMethodServiceJava 文档

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

构造函数

InputMethodService()
InputMethodService(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

字段

AccessibilityService

#getSystemService(String)用于检索android.view.accessibility.AccessibilityManager用于通过注册的事件侦听器向用户提供 UI 事件的反馈。

(继承自 Context)
AccountService

#getSystemService(String)用于在选择时检索android.accounts.AccountManager用于接收意向的意向。

(继承自 Context)
ActivityService

#getSystemService(String)用于检索与全局系统状态交互的项android.app.ActivityManager

(继承自 Context)
AlarmService

#getSystemService(String)用于在选择时检索android.app.AlarmManager用于接收意向的意向。

(继承自 Context)
AppOpsService

用于 #getSystemService(String) 检索用于跟踪 android.app.AppOpsManager 设备上的应用程序操作。

(继承自 Context)
AppSearchService

#getSystemService(String)用于检索android.app.appsearch.AppSearchManager索引和查询由系统管理的应用数据。

(继承自 Context)
AppwidgetService

#getSystemService(String)用于检索用于访问 AppWidgets 的命令android.appwidget.AppWidgetManager

(继承自 Context)
AudioService

用于 #getSystemService(String) 检索 android.media.AudioManager 用于处理音量、响铃模式和音频路由的管理。

(继承自 Context)
BatteryService

#getSystemService(String)用于检索用于管理电池状态的 Aandroid.os.BatteryManager

(继承自 Context)
BindAllowActivityStarts
已过时.

#bindService标志:如果从可见的应用绑定,则允许绑定服务从后台启动活动。

(继承自 Context)
BindExternalServiceLong

的工作方式与 #BIND_EXTERNAL_SERVICE 相同,但它被定义为 ()

(继承自 Context)
BindNotPerceptible
已过时.

#bindService标志:如果从可见或用户可感知的应用进行绑定,请将目标服务的重要性降低到可感知级别以下。

(继承自 Context)
BindSharedIsolatedProcess
已过时.

标志: #bindIsolatedService将服务绑定到共享隔离进程。

(继承自 Context)
BiometricService

#getSystemService(String)用于检索android.hardware.biometrics.BiometricManager用于处理生物识别和 PIN/模式/密码身份验证。

(继承自 Context)
BlobStoreService

#getSystemService(String)用于从系统维护的 Blob 存储中检索android.app.blob.BlobStoreManager参与和访问数据 Blob。

(继承自 Context)
BluetoothService

#getSystemService(String)用于检索android.bluetooth.BluetoothManager使用蓝牙的用途。

(继承自 Context)
BugreportService

用于捕获 bug 报告的服务。

(继承自 Context)
CameraService

#getSystemService(String)用于检索android.hardware.camera2.CameraManager与相机设备的交互。

(继承自 Context)
CaptioningService

用于 #getSystemService(String) 检索用于获取字幕属性和侦听字幕首选项更改的项 android.view.accessibility.CaptioningManager

(继承自 Context)
CarrierConfigService

用于 #getSystemService(String) 检索 android.telephony.CarrierConfigManager 读取运营商配置值。

(继承自 Context)
ClipboardService

#getSystemService(String)用于检索android.content.ClipboardManager用于访问和修改全局剪贴板的内容。

(继承自 Context)
CompanionDeviceService

#getSystemService(String)用于检索android.companion.CompanionDeviceManager用于管理配套设备

(继承自 Context)
ConnectivityDiagnosticsService

用于 #getSystemService(String) 检索 android.net.ConnectivityDiagnosticsManager 用于执行网络连接诊断以及从系统接收网络连接信息。

(继承自 Context)
ConnectivityService

用于 #getSystemService(String) 检索 android.net.ConnectivityManager 用于处理网络连接管理的信息。

(继承自 Context)
ConsumerIrService

用于 #getSystemService(String) 检索 android.hardware.ConsumerIrManager 用于从设备传输红外信号的信号。

(继承自 Context)
CredentialService

#getSystemService(String)用于检索用户android.credentials.CredentialManager对应用进行身份验证。

(继承自 Context)
CrossProfileAppsService

用于 #getSystemService(String) 检索 android.content.pm.CrossProfileApps 跨配置文件操作。

(继承自 Context)
DeviceIdDefault

默认设备 ID,即主设备(非虚拟)设备的 ID。

(继承自 Context)
DeviceIdInvalid

设备 ID 无效。

(继承自 Context)
DeviceLockService

#getSystemService(String)用于检索 android.devicelock.DeviceLockManager.

(继承自 Context)
DevicePolicyService

#getSystemService(String)用于检索用于处理全局设备策略管理的项android.app.admin.DevicePolicyManager

(继承自 Context)
DisplayHashService

#getSystemService(String)用于访问android.view.displayhash.DisplayHashManager以处理显示哈希。

(继承自 Context)
DisplayService

#getSystemService(String)用于检索android.hardware.display.DisplayManager与显示设备交互的项。

(继承自 Context)
DomainVerificationService

#getSystemService(String)用于检索已声明 Web 域的审批和用户状态。android.content.pm.verify.domain.DomainVerificationManager

(继承自 Context)
DownloadService

android.app.DownloadManager 一起使用#getSystemService(String),用于检索请求 HTTP 下载。

(继承自 Context)
DropboxService

#getSystemService(String)用于检索用于记录诊断日志的android.os.DropBoxManager实例。

(继承自 Context)
EuiccService

#getSystemService(String)用于检索android.telephony.euicc.EuiccManager用于管理设备 eUICC (嵌入式 SIM) 的设备。

(继承自 Context)
FileIntegrityService

#getSystemService(String)用于检索 android.security.FileIntegrityManager.

(继承自 Context)
FingerprintService

用于 #getSystemService(String) 检索用于处理指纹管理的命令 android.hardware.fingerprint.FingerprintManager

(继承自 Context)
GameService

#getSystemService(String)用于检索 GameManager.

(继承自 Context)
GrammaticalInflectionService

#getSystemService(String)用于检索 GrammaticalInflectionManager.

(继承自 Context)
HardwarePropertiesService

用于 #getSystemService(String) 检索 android.os.HardwarePropertiesManager 用于访问硬件属性服务的方法。

(继承自 Context)
HealthconnectService

#getSystemService(String)用于检索 android.health.connect.HealthConnectManager.

(继承自 Context)
InputMethodService

用于 #getSystemService(String) 检索 android.view.inputmethod.InputMethodManager 用于访问输入方法的输入方法。

(继承自 Context)
InputService

#getSystemService(String)用于检索android.hardware.input.InputManager与输入设备交互的项。

(继承自 Context)
IpsecService

#getSystemService(String)用于检索android.net.IpSecManager用于使用 IPSec 加密套接字或网络。

(继承自 Context)
JobSchedulerService

#getSystemService(String)用于检索android.app.job.JobScheduler用于管理偶尔的后台任务的实例。

(继承自 Context)
KeyguardService

#getSystemService(String)用于检索android.app.KeyguardManager用于控制密钥保护的密钥保护。

(继承自 Context)
LauncherAppsService

用于 #getSystemService(String) 检索 android.content.pm.LauncherApps 用于跨用户的配置文件查询和监视可启动的应用。

(继承自 Context)
LayoutInflaterService

用于 #getSystemService(String) 检索用于在此上下文中膨胀布局资源的引用 android.view.LayoutInflater

(继承自 Context)
LocaleService

#getSystemService(String)用于检索 android.app.LocaleManager.

(继承自 Context)
LocationService

android.location.LocationManager 一起使用#getSystemService(String),用于检索用于控制位置更新。

(继承自 Context)
MediaCommunicationService

#getSystemService(String)用于检索android.media.MediaCommunicationManager 用于管理 android.media.MediaSession2

(继承自 Context)
MediaMetricsService

用于 #getSystemService(String) 检索 android.media.metrics.MediaMetricsManager 与设备上的媒体指标交互的项。

(继承自 Context)
MediaProjectionService

用于 #getSystemService(String) 检索 android.media.projection.MediaProjectionManager 用于管理媒体投影会话的实例。

(继承自 Context)
MediaRouterService

#getSystemService用于检索android.media.MediaRouter媒体的控制和管理路由。

(继承自 Context)
MediaSessionService

用于 #getSystemService(String) 检索用于管理媒体会话的命令 android.media.session.MediaSessionManager

(继承自 Context)
MidiService

用于 #getSystemService(String) 检索用于访问 MIDI 服务的 A android.media.midi.MidiManager

(继承自 Context)
NetworkStatsService

用于 #getSystemService(String) 检索用于查询网络使用情况统计信息的查询 android.app.usage.NetworkStatsManager

(继承自 Context)
NfcService

#getSystemService(String)用于检索使用 NFC 的 ANFCandroid.nfc.NfcManager

(继承自 Context)
NotificationService

android.app.NotificationManager 一起使用#getSystemService(String),用于检索通知用户后台事件。

(继承自 Context)
NsdService

用于 #getSystemService(String) 检索 android.net.nsd.NsdManager 用于处理网络服务发现管理

(继承自 Context)
OverlayService

#getSystemService(String)用于检索用于管理覆盖包的集合android.content.om.OverlayManager

(继承自 Context)
PeopleService

#getSystemService(String)用于访问与PeopleManager已发布对话交互的会话。

(继承自 Context)
PerformanceHintService

#getSystemService(String)用于检索android.os.PerformanceHintManager用于访问性能提示服务。

(继承自 Context)
PowerService

#getSystemService(String)用于检索用于控制电源管理(包括“唤醒锁”)的命令android.os.PowerManager,这样就可以在长时间运行任务时使设备保持打开状态。

(继承自 Context)
PrintService

android.print.PrintManager 用于打印和管理打印机和打印任务。

(继承自 Context)
ReceiverExported
已过时.

#registerReceiver标志:接收方可以从其他应用接收广播。

(继承自 Context)
ReceiverNotExported
已过时.

#registerReceiver标志:接收方无法接收来自其他应用的广播。

(继承自 Context)
ReceiverVisibleToInstantApps
已过时.

标志: #registerReceiver接收方可以从即时应用接收广播。

(继承自 Context)
RestrictionsService

用于 #getSystemService(String) 检索 android.content.RestrictionsManager 检索应用程序限制和请求受限操作的权限。

(继承自 Context)
RoleService

用于 #getSystemService(String) 检索 android.app.role.RoleManager 用于管理角色的角色。

(继承自 Context)
SearchService

#getSystemService(String)用于检索android.app.SearchManager用于处理搜索的查询。

(继承自 Context)
SensorService

#getSystemService(String)用于检索用于访问传感器的通道android.hardware.SensorManager

(继承自 Context)
ShortcutService

#getSystemService(String)用于检索用于访问启动器快捷方式服务的命令android.content.pm.ShortcutManager

(继承自 Context)
StatusBarService

#getSystemService(String)用于检索与状态栏和快速设置交互的项android.app.StatusBarManager

(继承自 Context)
StopForegroundDetach
已过时.

选择器: #stopForeground(int)如果已设置,则之前提供的 #startForeground 通知将从服务的生命周期中分离。

(继承自 Service)
StopForegroundLegacy

选择器: #stopForeground(int)等效于传递给 false 旧 API #stopForeground(boolean)

(继承自 Service)
StopForegroundRemove
已过时.

选择器: #stopForeground(int)如果已提供,则之前提供的 #startForeground 通知将被取消,并从显示中删除。

(继承自 Service)
StorageService

用于 #getSystemService(String) 检索用于访问系统存储函数的函数 android.os.storage.StorageManager

(继承自 Context)
StorageStatsService

#getSystemService(String)用于检索用于访问系统存储统计信息的集合android.app.usage.StorageStatsManager

(继承自 Context)
SystemHealthService

#getSystemService(String)用于检索用于访问系统运行状况(电池、电源、内存等)指标的指标android.os.health.SystemHealthManager

(继承自 Context)
TelecomService

#getSystemService(String)用于检索设备android.telecom.TelecomManager与电信相关的功能。

(继承自 Context)
TelephonyImsService

#getSystemService(String)用于检索 android.telephony.ims.ImsManager.

(继承自 Context)
TelephonyService

用于 #getSystemService(String) 检索 android.telephony.TelephonyManager 用于处理设备电话功能的管理。

(继承自 Context)
TelephonySubscriptionService

用于 #getSystemService(String) 检索 android.telephony.SubscriptionManager 用于处理设备的电话订阅的管理。

(继承自 Context)
TextClassificationService

#getSystemService(String)用于检索TextClassificationManager文本分类服务。

(继承自 Context)
TextServicesManagerService

用于 #getSystemService(String) 检索 android.view.textservice.TextServicesManager 用于访问文本服务。

(继承自 Context)
TvInputService

#getSystemService(String)用于检索用于在设备上与电视输入进行交互的项android.media.tv.TvInputManager

(继承自 Context)
TvInteractiveAppService

#getSystemService(String)用于检索android.media.tv.interactive.TvInteractiveAppManager设备上用于与电视交互应用程序的交互。

(继承自 Context)
UiModeService

用于 #getSystemService(String) 检索用于控制 UI 模式的控件 android.app.UiModeManager

(继承自 Context)
UsageStatsService

#getSystemService(String)用于检索android.app.usage.UsageStatsManager用于查询设备使用情况统计信息的查询。

(继承自 Context)
UsbService

用于 #getSystemService(String) 检索 android.hardware.usb.UsbManager 对 USB 设备的访问(作为 USB 主机)以及控制此设备作为 USB 设备的行为。

(继承自 Context)
UserService

用于 #getSystemService(String) 检索用于 android.os.UserManager 管理支持多个用户的设备上的用户。

(继承自 Context)
VibratorManagerService

用于 #getSystemService(String) 检索用于访问设备振动器、与单个振动器交互以及对多个振动器播放同步效果的 a android.os.VibratorManager

(继承自 Context)
VibratorService

用于 #getSystemService(String) 检索与振动硬件交互的 A android.os.Vibrator

(继承自 Context)
VirtualDeviceService

用于 #getSystemService(String) 检索用于管理虚拟设备的设备 android.companion.virtual.VirtualDeviceManager

(继承自 Context)
VpnManagementService

#getSystemService(String)用于检索android.net.VpnManager用于管理平台内置 VPN 的配置文件。

(继承自 Context)
WallpaperService

用于 #getSystemService(String) 检索 com。

(继承自 Context)
WifiAwareService

用于 #getSystemService(String) 检索 android.net.wifi.aware.WifiAwareManager 用于处理 Wi-Fi 感知的管理。

(继承自 Context)
WifiP2pService

用于 #getSystemService(String) 检索 android.net.wifi.p2p.WifiP2pManager 用于处理 Wi-Fi 对等连接的管理。

(继承自 Context)
WifiRttRangingService

android.net.wifi.rtt.WifiRttManager/a0#getSystemService(String)> 一起使用,使用 wifi 检索范围设备。

(继承自 Context)
WifiService

用于 #getSystemService(String) 检索 android.net.wifi.WifiManager 用于处理 Wi-Fi 访问的管理。

(继承自 Context)
WindowService

#getSystemService(String)用于检索android.view.WindowManager用于访问系统的窗口管理器。

(继承自 Context)

属性

Application

返回拥有此服务的应用程序。

(继承自 Service)
ApplicationContext

返回当前进程的单个全局 Application 对象的上下文。

(继承自 ContextWrapper)
ApplicationInfo

返回此上下文包的完整应用程序信息。

(继承自 ContextWrapper)
Assets

返回应用程序的包的 AssetManager 实例。

(继承自 ContextWrapper)
AttributionSource

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
AttributionTag

属性可用于复杂应用中,以逻辑方式分隔应用的各个部分。

(继承自 Context)
BackDisposition

检索当前处置模式,该模式指示预期的后退按钮提供。 - 或 - 设置处置模式,该模式指示后退按钮的预期负担。

BaseContext (继承自 ContextWrapper)
CacheDir

返回文件系统上特定于应用程序的缓存目录的绝对路径。

(继承自 ContextWrapper)
CandidatesHiddenVisibility

如果未显示候选视图,则返回候选视图的可见性模式( View#INVISIBLE View.INVISIBLEView#GONE View.GONE)。

Class

返回此 Object的运行时类。

(继承自 Object)
ClassLoader

返回可用于检索此包中的类的类加载程序。

(继承自 ContextWrapper)
CodeCacheDir

返回文件系统上用于存储缓存代码的应用程序特定缓存目录的绝对路径。

(继承自 ContextWrapper)
ContentResolver

返回应用程序的包的 ContentResolver 实例。

(继承自 ContextWrapper)
CurrentInputBinding

返回输入方法的当前活动 InputBinding;如果没有输入法,则返回 null。

CurrentInputConnection

检索绑定到输入法的当前活动 InputConnection;如果没有,则为 null。

CurrentInputEditorInfo
CurrentInputStarted
DataDir

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
DeviceId

获取与此上下文关联的设备 ID。

(继承自 Context)
Display

获取与此上下文关联的显示。

(继承自 Context)
ExternalCacheDir

返回主外部文件系统上目录的绝对路径(位于应用程序可以放置其拥有的缓存文件的某个位置 ExternalStorageDirectory )。

(继承自 ContextWrapper)
ExtractViewShown

返回是否显示全屏提取视图。 - 或 - 控制提取的文本区域的可见性。

FilesDir

返回存储使用 OpenFileOutput(String, FileCreationMode) 文件创建的文件系统上的目录的绝对路径。

(继承自 ContextWrapper)
ForegroundServiceType

如果服务已通过调用成为前台服务 #startForeground(int, Notification) 或者 #startForeground(int, Notification, int)#getForegroundServiceType() 返回当前的前台服务类型。

(继承自 Service)
Handle

基础 Android 实例的句柄。

(继承自 Object)
InputMethodWindowRecommendedHeight

旨在返回以前的输入法, Insets#contentTopInsets但其实际语义从未定义过。

IsDeviceProtectedStorage

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
IsFullscreenMode

返回输入法<>当前</em> 是否在全屏模式下运行。

IsInputViewShown

返回软输入视图是否为 <em>当前</em> 向用户显示。

IsRestricted

指示此上下文是否受到限制。

(继承自 Context)
IsShowInputRequested

如果系统要求显示输入视图,则返回 true。

IsUiContext

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 AbstractInputMethodService)
JniIdentityHashCode

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
JniPeerMembers

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

KeyDispatcherState

返回用于处理来自目标应用程序的事件的全局 KeyEvent.DispatcherState KeyEvent.DispatcherState 值。

(继承自 AbstractInputMethodService)
LayoutInflater
MainExecutor

Executor返回将在与此上下文关联的主线程上运行排队任务。

(继承自 Context)
MainLooper

返回当前进程的主线程的 Looper。

(继承自 ContextWrapper)
MaxWidth

返回输入法可用的最大宽度(以像素为单位)。

NoBackupFilesDir

返回文件系统上目录的绝对路径,类似于 FilesDir.

(继承自 ContextWrapper)
ObbDir

返回可在其中找到此应用程序的 OBB 文件(如果有)的主外部存储目录。

(继承自 ContextWrapper)
OpPackageName

返回应该用于 android.app.AppOpsManager 来自此上下文的调用的包名称,以便应用操作管理器的 uid 验证将使用该名称。

(继承自 Context)
PackageCodePath

返回此上下文的主要 Android 包的完整路径。

(继承自 ContextWrapper)
PackageManager

返回 PackageManager 实例以查找全局包信息。

(继承自 ContextWrapper)
PackageName

返回此应用程序的包的名称。

(继承自 ContextWrapper)
PackageResourcePath

返回此上下文的主要 Android 包的完整路径。

(继承自 ContextWrapper)
Params

返回创建此上下文时所使用的参数集(如果通过该 #createContext(ContextParams)参数创建)。

(继承自 Context)
PeerReference

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
Resources

返回应用程序的包的资源实例。

(继承自 ContextWrapper)
StylusHandwritingIdleTimeoutMax

返回用于 #setStylusHandwritingSessionTimeout(Duration)的最大触笔手写会话空闲超时。

StylusHandwritingSessionTimeout

返回持续时间,之后未收到新 MotionEvent手写笔的正在进行的触笔手写会话将超时,并 #finishStylusHandwriting() 将被调用。 - 或 - 设置持续时间后,尚未收到新 MotionEvent手写笔的正在进行的触笔手写会话将超时,并 #finishStylusHandwriting() 将被调用。

StylusHandwritingWindow

返回触笔手写墨迹书写窗口。

Theme

返回与此上下文关联的 Theme 对象。

(继承自 ContextWrapper)
ThresholdClass

此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。

ThresholdType

此 API 支持 Mono for Android 基础结构,不打算直接从代码使用。

Wallpaper (继承自 ContextWrapper)
WallpaperDesiredMinimumHeight (继承自 ContextWrapper)
WallpaperDesiredMinimumWidth (继承自 ContextWrapper)
Window

方法

AttachBaseContext(Context)

设置此 ContextWrapper 的基本上下文。

(继承自 ContextWrapper)
BindService(Intent, Bind, IExecutor, IServiceConnection)

与执行程序一样 #bindService(Intent, ServiceConnection, int) bindService(Intent, ServiceConnection, int) ,用于控制 ServiceConnection 回调。

(继承自 Context)
BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
BindService(Intent, IServiceConnection, Bind)

连接到应用程序服务,根据需要创建它。

(继承自 ContextWrapper)
BindService(Intent, IServiceConnection, Context+BindServiceFlags)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle)

以与给定 user 相同的方式 #bindService绑定到服务。

(继承自 Context)
CheckCallingOrSelfPermission(String)

确定 IPC 的调用过程还是你被授予了特定权限。

(继承自 ContextWrapper)
CheckCallingOrSelfUriPermission(Uri, ActivityFlags)

确定 IPC 的调用过程还是已授予访问特定 URI 的权限。

(继承自 ContextWrapper)
CheckCallingOrSelfUriPermissions(IList<Uri>, Int32)

确定 IPC <em>或 you</em> 的调用过程是否被授予访问 URI 列表的权限。

(继承自 Context)
CheckCallingPermission(String)

确定你正在处理的 IPC 的调用过程是否被授予特定权限。

(继承自 ContextWrapper)
CheckCallingUriPermission(Uri, ActivityFlags)

确定调用过程和用户 ID 是否被授予访问特定 URI 的权限。

(继承自 ContextWrapper)
CheckCallingUriPermissions(IList<Uri>, Int32)

确定调用过程和用户 ID 是否被授予访问 URI 列表的权限。

(继承自 Context)
CheckPermission(String, Int32, Int32)

确定是否允许特定进程和系统中运行的用户 ID 的给定权限。

(继承自 ContextWrapper)
CheckSelfPermission(String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
CheckUriPermission(Uri, Int32, Int32, ActivityFlags)

确定是否已向特定进程和用户 ID 授予访问特定 URI 的权限。

(继承自 ContextWrapper)
CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags)

检查 URI 和正常权限。

(继承自 ContextWrapper)
CheckUriPermissions(IList<Uri>, Int32, Int32, Int32)

确定是否向特定进程和用户 ID 授予了访问 URI 列表的权限。

(继承自 Context)
ClearWallpaper()
已过时.
(继承自 ContextWrapper)
Clone()

创建并返回此对象的副本。

(继承自 Object)
CreateAttributionContext(String)

返回当前上下文的新 Context 对象,但将属性返回到其他标记。

(继承自 Context)
CreateConfigurationContext(Configuration)

返回当前上下文的新 Context 对象,但要调整其资源以匹配给定的配置。

(继承自 ContextWrapper)
CreateContext(ContextParams)

创建具有特定属性和行为的上下文。

(继承自 Context)
CreateContextForSplit(String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
CreateDeviceContext(Int32)

从当前上下文中返回一个新 Context 对象,但与设备关联由 < a0 deviceId/> 提供。

(继承自 Context)
CreateDeviceProtectedStorageContext()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
CreateDisplayContext(Display)

返回当前上下文的新 Context 对象,但其资源经过调整以匹配给定的显示指标。

(继承自 ContextWrapper)
CreatePackageContext(String, PackageContextFlags)

返回给定应用程序名称的新 Context 对象。

(继承自 ContextWrapper)
CreateWindowContext(Display, Int32, Bundle)

为给定Display的窗口android.app.Activity activity创建一Context个非窗口。

(继承自 Context)
CreateWindowContext(Int32, Bundle)

为非活动窗口创建上下文。

(继承自 Context)
DatabaseList()

返回一个字符串数组,该字符串命名与此上下文的应用程序包关联的专用数据库。

(继承自 ContextWrapper)
DeleteDatabase(String)

删除与此上下文的应用程序包关联的现有专用 SQLiteDatabase。

(继承自 ContextWrapper)
DeleteFile(String)

删除与此上下文的应用程序包关联的给定专用文件。

(继承自 ContextWrapper)
DeleteSharedPreferences(String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
Dispose()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
Dispose(Boolean)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
Dump(FileDescriptor, PrintWriter, String[])

将服务的状态打印到给定流中。

(继承自 Service)
EnableHardwareAcceleration()
已过时.

可以调用此调用以尝试为 IME 启用加速绘图。

EnforceCallingOrSelfPermission(String, String)

如果你和你正在处理的 IPC 的调用过程都未被授予特定权限,则引发一个 SecurityException

(继承自 ContextWrapper)
EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String)

如果 IPC 的调用过程或 尚未授予访问特定 URI 的权限,则引发 SecurityException

(继承自 ContextWrapper)
EnforceCallingPermission(String, String)

如果正在处理的 IPC 的调用过程尚未被授予特定权限,则引发一个 SecurityException

(继承自 ContextWrapper)
EnforceCallingUriPermission(Uri, ActivityFlags, String)

如果调用过程和用户 ID 尚未授予访问特定 URI 的权限,则引发 SecurityException

(继承自 ContextWrapper)
EnforcePermission(String, Int32, Int32, String)

如果系统中运行的特定进程和用户 ID 不允许给定权限,则引发一个 SecurityException

(继承自 ContextWrapper)
EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String)

如果未向特定进程和用户 ID 授予访问特定 URI 的权限,则引发 SecurityException

(继承自 ContextWrapper)
EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String)

强制实施 URI 和普通权限。

(继承自 ContextWrapper)
Equals(Object)

指示其他对象是否“等于”此对象。

(继承自 Object)
FileList()

返回一个字符串数组,用于命名与此上下文的应用程序包关联的专用文件。

(继承自 ContextWrapper)
FinishStylusHandwriting()

完成当前触笔手写会话。

GetColor(Int32)

返回与特定资源 ID 关联的颜色,并为当前主题设置样式。

(继承自 Context)
GetColorStateList(Int32)

返回与特定资源 ID 关联的颜色状态列表,并为当前主题设置样式。

(继承自 Context)
GetDatabasePath(String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
GetDir(String, FileCreationMode)

根据需要检索、创建应用程序可以放置其自己的自定义数据文件的新目录。

(继承自 ContextWrapper)
GetDrawable(Int32)

返回与特定资源 ID 关联的可绘制对象,并为当前主题设置样式。

(继承自 Context)
GetExternalCacheDirs()

返回应用程序可在应用程序拥有的缓存文件的所有外部存储设备上返回特定于应用程序的目录的绝对路径。

(继承自 ContextWrapper)
GetExternalFilesDir(String)

返回主外部文件系统(位于某个位置 ExternalStorageDirectory)上目录的绝对路径,应用程序可以在其中放置其拥有的永久性文件。

(继承自 ContextWrapper)
GetExternalFilesDirs(String)

返回应用程序在应用程序拥有的所有外部存储设备上特定于应用程序的目录的绝对路径,其中应用程序可以放置其拥有的永久性文件。

(继承自 ContextWrapper)
GetExternalMediaDirs()
已过时.

返回应用程序可在其中放置媒体文件的所有外部存储设备上特定于应用程序的目录的绝对路径。

(继承自 ContextWrapper)
GetFileStreamPath(String)

返回存储使用 OpenFileOutput(String, FileCreationMode) 文件创建的文件系统上的绝对路径。

(继承自 ContextWrapper)
GetHashCode()

返回对象的哈希代码值。

(继承自 Object)
GetObbDirs()

返回应用程序 OBB 文件(如果有)的所有外部存储设备上特定于应用程序的目录的绝对路径(如果有)。

(继承自 ContextWrapper)
GetSharedPreferences(String, FileCreationMode)

检索并保存首选项文件“name”的内容,并返回一个共享首选项,通过该共享首选项可以检索和修改其值。

(继承自 ContextWrapper)
GetString(Int32)

从应用程序包的默认字符串表中返回本地化字符串。

(继承自 Context)
GetString(Int32, Object[])

从应用程序包的默认字符串表中返回本地化字符串。

(继承自 Context)
GetSystemService(Class)

按类将句柄返回到系统级服务。

(继承自 Context)
GetSystemService(String)

按名称将句柄返回到系统级服务。

(继承自 ContextWrapper)
GetSystemServiceName(Class)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
GetText(Int32)

从应用程序包的默认字符串表中返回本地化样式的 CharSequence。

(继承自 Context)
GetTextForImeAction(ImeAction)

返回可用作给定 EditorInfo#imeOptions EditorInfo.imeOptions按钮标签的文本。

GetTextForImeActionFormatted(ImeAction)

返回可用作给定 EditorInfo#imeOptions EditorInfo.imeOptions按钮标签的文本。

GetTextFormatted(Int32)

从应用程序包的默认字符串表中返回本地化样式的 CharSequence。

(继承自 Context)
GrantUriPermission(String, Uri, ActivityFlags)

无论该包是否具有访问 Uri 的内容提供程序的常规权限,都授予访问另一个包的特定 URI 的权限。

(继承自 ContextWrapper)
HideStatusIcon()
HideWindow()
JavaFinalize()

当垃圾回收确定不再引用该对象时,由对象上的垃圾回收器调用。

(继承自 Object)
MoveDatabaseFrom(Context, String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
MoveSharedPreferencesFrom(Context, String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
Notify()

唤醒正在等待此对象的监视器的单个线程。

(继承自 Object)
NotifyAll()

唤醒正在等待此对象的监视器的所有线程。

(继承自 Object)
ObtainStyledAttributes(IAttributeSet, Int32[])

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
ObtainStyledAttributes(Int32, Int32[])

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
ObtainStyledAttributes(Int32[])

在此上下文的主题中检索带样式的属性信息。

(继承自 Context)
OnAppPrivateCommand(String, Bundle)
OnBind(Intent)

将信道返回到服务。

(继承自 AbstractInputMethodService)
OnBindInput()

当新客户端绑定到输入法时调用。

OnComputeInsets(InputMethodService+Insets)

在 UI 中计算有趣的内嵌。

OnConfigurationChanged(Configuration)

当设备配置在组件运行时发生更改时由系统调用。

(继承自 Service)
OnConfigureWindow(Window, Boolean, Boolean)

更新给定模式的给定窗口参数。

OnCreate()

首次创建服务时由系统调用。

(继承自 Service)
OnCreateCandidatesView()

创建并返回用于显示候选项的视图层次结构。

OnCreateExtractTextView()

由框架调用以创建用于显示提取文本的布局。

OnCreateInlineSuggestionsRequest(Bundle)

当自动填充从 InlineSuggestionsRequest IME 请求时调用。

OnCreateInputMethodInterface()
已过时.

实现以返回我们的标准 InputMethodImpl

OnCreateInputMethodSessionInterface()
已过时.

实现以返回我们的标准 InputMethodSessionImpl

OnCreateInputView()

创建并返回用于输入区域的视图层次结构(如软键盘)。

OnCurrentInputMethodSubtypeChanged(InputMethodSubtype)

更改子类型时调用。

OnDestroy()

系统调用,以通知服务不再使用它并正在删除。

(继承自 Service)
OnDisplayCompletions(CompletionInfo[])

当应用程序报告要显示输入法的自动完成候选项时调用。

OnEvaluateFullscreenMode()

重写此选项以控制输入方法何时应在全屏模式下运行。

OnEvaluateInputViewShown()

重写此项以控制何时应向用户显示软输入区域。

OnExtractedCursorMovement(Int32, Int32)

当用户在提取的文本视图中执行游标移动(在全屏模式下运行时)时,将调用它。

OnExtractedSelectionChanged(Int32, Int32)

当用户在提取的文本视图中移动光标(在 fullsreen 模式下运行时)时,将调用此方法。

OnExtractedTextClicked()

当用户在全屏模式下运行时单击提取的文本视图时,将调用此方法。

OnExtractingInputChanged(EditorInfo)

当当前在提取模式下显示时,当前输入目标将发生更改时,将调用此方法。

OnExtractTextContextMenuItem(Int32)

当用户从提取的文本视图中选择了上下文菜单项(在全屏模式下运行时)时,将调用此方法。

OnFinishCandidatesView(Boolean)

当用户隐藏候选视图时调用。

OnFinishInput()

调用以通知输入法文本输入已在最后一个编辑器中完成。

OnFinishInputView(Boolean)

当用户隐藏输入视图时调用。

OnFinishStylusHandwriting()

当当前触笔手写会话完成时调用(由系统或通过 #finishStylusHandwriting()系统调用)。

OnGenericMotionEvent(MotionEvent)

实现此操作以处理输入方法上的泛型运动事件。

(继承自 AbstractInputMethodService)
OnInitializeInterface()

这是子类可用于对其接口执行初始化的挂钩。

OnInlineSuggestionsResponse(InlineSuggestionsResponse)

当自动填充响应时调用包含 InlineSuggestionsResponse 内联建议。

OnKeyDown(Keycode, KeyEvent)

从目标应用程序转发时 KeyEvent 回叫。

OnKeyLongPress(Keycode, KeyEvent)

默认实现: KeyEvent.Callback#onKeyLongPress(int, KeyEvent) KeyEvent.Callback.onKeyLongPress()始终返回 false(不处理事件)。

OnKeyMultiple(Keycode, Int32, KeyEvent)

重写此项以在应用程序处理特殊键多个事件之前截获这些事件。

OnKeyUp(Keycode, KeyEvent)

重写此项以在应用程序处理键之前截获键事件。

OnLowMemory()

当整个系统内存不足时,会调用此方法,并且主动运行的进程应剪裁其内存使用率。

(继承自 Service)
OnPrepareStylusHandwriting()

调用以准备触笔手写。

OnRebind(Intent)

当新客户端已连接到服务时调用,此前已通知其所有客户端已断开连接 #onUnbind

(继承自 Service)
OnShowInputRequested(ShowFlags, Boolean)

系统已决定可能需要显示输入法。

OnStart(Intent, Int32)
已过时.

此成员已弃用。

(继承自 Service)
OnStartCandidatesView(EditorInfo, Boolean)

仅当显示候选视图以在用户通过硬键盘输入文本时显示处理时调用。

OnStartCommand(Intent, StartCommandFlags, Int32)

每次客户端通过调用显式启动服务、提供提供的参数以及表示启动请求的唯一整数令牌时,由系统调用 android.content.Context#startService

(继承自 Service)
OnStartInput(EditorInfo, Boolean)

调用以通知输入法文本输入已在编辑器中启动。

OnStartInputView(EditorInfo, Boolean)

在显示输入视图并且输入已在新的编辑器上启动时调用。

OnStartStylusHandwriting()

当应用请求触笔手写 InputMethodManager#startStylusHandwriting(View)时调用。

OnStylusHandwritingMotionEvent(MotionEvent)

在每个触笔MotionEvent返回true#onStartStylusHandwriting()调用。

OnTaskRemoved(Intent)

如果服务当前正在运行,并且用户删除了来自服务应用程序的任务,则调用此方法。

(继承自 Service)
OnTimeout(Int32)

对超时调用的 ServiceInfo#FOREGROUND_SERVICE_TYPE_SHORT_SERVICE回调。

(继承自 Service)
OnTrackballEvent(MotionEvent)

实现此操作以处理输入方法上的轨迹球事件。

(继承自 AbstractInputMethodService)
OnTrimMemory(TrimMemory)

当操作系统确定进程从其进程中剪裁不需要的内存是一个好时机时调用。

(继承自 Service)
OnUnbind(Intent)

当所有客户端都与服务发布的特定接口断开连接时调用。

(继承自 Service)
OnUnbindInput()

当上一个绑定客户端不再与输入法关联时调用。

OnUpdateCursor(Rect)
已过时.

当应用程序报告其文本游标的新位置时调用。

OnUpdateCursorAnchorInfo(CursorAnchorInfo)

当应用程序报告其文本插入点的新位置和组合字符串中的字符时调用。

OnUpdateEditorToolType(MotionEventToolType)

当用户点击或单击某个 android.widget.Editor值时调用。

OnUpdateExtractedText(Int32, ExtractedText)

当应用程序报告由于当前文本状态更改而显示的新提取文本时调用。

OnUpdateExtractingViews(EditorInfo)

当全屏模式提取编辑器信息发生更改时调用,以更新其 UI 的状态,例如显示的操作按钮。

OnUpdateExtractingVisibility(EditorInfo)

当全屏模式提取编辑器信息发生更改时调用,以确定是否应显示 UI 的提取(提取文本和候选文本)部分。

OnUpdateSelection(Int32, Int32, Int32, Int32, Int32, Int32)

当应用程序报告文本的新选择区域时调用。

OnViewClicked(Boolean)

当用户点击或单击文本视图时调用。

OnWindowHidden()

在以前可见后,在用户隐藏输入法窗口时调用。

OnWindowShown()

在向用户显示输入法窗口之前立即调用。

OpenFileInput(String)

打开与此上下文的应用程序包关联的专用文件进行读取。

(继承自 ContextWrapper)
OpenFileOutput(String, FileCreationMode)

打开与此上下文的应用程序包关联的专用文件进行写入。

(继承自 ContextWrapper)
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory)

打开与此上下文的应用程序包关联的新专用 SQLiteDatabase。

(继承自 ContextWrapper)
OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler)

打开与此上下文的应用程序包关联的新专用 SQLiteDatabase。

(继承自 ContextWrapper)
PeekWallpaper()
已过时.
(继承自 ContextWrapper)
RegisterComponentCallbacks(IComponentCallbacks)

向上下文的基本应用程序添加新内容 ComponentCallbacks ,它将在调用 ActivityCallbacks 方法和其他组件的同一时间调用。

(继承自 Context)
RegisterDeviceIdChangeListener(IExecutor, IIntConsumer)

向 添加新的设备 ID 更改侦听器 Context,将在系统更改设备关联时调用该侦听器。

(继承自 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter)

注册在主活动线程中运行的 BroadcastReceiver。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags)
已过时.

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler)

注册以接收意向广播,以在计划程序上下文中运行。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags)
已过时.

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
RemoveStickyBroadcast(Intent)
已过时.
(继承自 ContextWrapper)
RemoveStickyBroadcastAsUser(Intent, UserHandle)
已过时.
(继承自 ContextWrapper)
RequestHideSelf(HideSoftInputFlags)

关闭此输入方法的软输入区域,将其从显示器中删除。

RequestShowSelf(ShowFlags)

显示输入法的软输入区域,以便用户看到输入法窗口,并且可以与之交互。

RevokeSelfPermissionOnKill(String)

触发运行时权限的异步吊销。

(继承自 Context)
RevokeSelfPermissionsOnKill(ICollection<String>)

触发调用包的一个或多个权限的吊销。

(继承自 Context)
RevokeUriPermission(String, Uri, ActivityFlags)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
RevokeUriPermission(Uri, ActivityFlags)

删除所有权限以访问以前使用 M:Android.Content.Context.GrantUriPermission(System.String,Android.Net.Uri,Android.Net.Uri,Android.Net.Uri)添加的特定内容提供程序 URI。

(继承自 ContextWrapper)
SendBroadcast(Intent)

向所有感兴趣的 BroadcastReceivers 广播给定意向。

(继承自 ContextWrapper)
SendBroadcast(Intent, String)

向所有感兴趣的 BroadcastReceivers 广播给定意向,允许强制实施可选的必需权限。

(继承自 ContextWrapper)
SendBroadcast(Intent, String, Bundle)

向所有感兴趣的 BroadcastReceivers 广播给定意向,允许强制实施可选的必需权限。

(继承自 Context)
SendBroadcastAsUser(Intent, UserHandle)

SendBroadcast(Intent)该版本允许你指定将发送到该广播的用户。

(继承自 ContextWrapper)
SendBroadcastAsUser(Intent, UserHandle, String)

SendBroadcast(Intent, String)该版本允许你指定将发送到该广播的用户。

(继承自 ContextWrapper)
SendBroadcastWithMultiplePermissions(Intent, String[])

向所有感兴趣的 BroadcastReceivers 广播给定意向,允许强制实施所需权限的数组。

(继承自 Context)
SendDefaultEditorAction(Boolean)

要求输入目标通过 InputConnection#performEditorAction InputConnection.performEditorAction().. 执行其默认操作。

SendDownUpKeyEvents(Keycode)

将给定的密钥事件代码(按定义) KeyEvent发送到当前输入连接是一个向下键 + 键向上事件对。

SendKeyChar(Char)

将给定的 UTF-16 字符发送到当前输入连接。

SendOrderedBroadcast(Intent, Int32, String, String, BroadcastReceiver, Handler, String, Bundle, Bundle)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
SendOrderedBroadcast(Intent, String)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle)

SendBroadcast(Intent)该版本允许从广播中接收数据。

(继承自 ContextWrapper)
SendOrderedBroadcast(Intent, String, Bundle)

向所有感兴趣的 BroadcastReceivers 广播给定意向,一次传送一个,以允许更多首选接收器在将广播传送到不太首选的接收方之前使用广播。

(继承自 Context)
SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle)

#sendBroadcast(Intent)该版本允许从广播中接收数据。

(继承自 Context)
SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle)

#sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)该版本允许你指定应用操作,以强制限制将广播发送到哪些接收方。

(继承自 Context)
SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
SendStickyBroadcast(Intent)
已过时.

#sendBroadcast(Intent)执行“粘滞”,这意味着在广播完成后发送的意向将保留在周围,以便其他人可以通过返回值#registerReceiver(BroadcastReceiver, IntentFilter)快速检索该数据。

(继承自 ContextWrapper)
SendStickyBroadcast(Intent, Bundle)

#sendBroadcast(Intent)执行“粘滞”,这意味着在广播完成后发送的意向将保留在周围,以便其他人可以通过返回值#registerReceiver(BroadcastReceiver, IntentFilter)快速检索该数据。

(继承自 Context)
SendStickyBroadcastAsUser(Intent, UserHandle)
已过时.
(继承自 ContextWrapper)
SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle)
已过时.
(继承自 ContextWrapper)
SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle)
已过时.
(继承自 ContextWrapper)
SetCandidatesView(View)

将当前候选视图替换为新的视图。

SetCandidatesViewShown(Boolean)

控制候选显示区域的可见性。

SetExtractView(View)
SetForeground(Boolean)

此成员已弃用。

(继承自 Service)
SetHandle(IntPtr, JniHandleOwnership)

设置 Handle 属性。

(继承自 Object)
SetInputView(View)

将当前输入视图替换为新的输入视图。

SetTheme(Int32)

设置此上下文的基本主题。

(继承自 ContextWrapper)
SetWallpaper(Bitmap)
已过时.
(继承自 ContextWrapper)
SetWallpaper(Stream)
已过时.
(继承自 ContextWrapper)
ShouldOfferSwitchingToNextInputMethod()

如果当前 IME 需要为用户提供切换到下一个输入法(e) 的方法,则返回 true。

ShowStatusIcon(Int32)
ShowWindow(Boolean)
StartActivities(Intent[])

StartActivities(Intent[], Bundle) 未指定任何选项相同。

(继承自 ContextWrapper)
StartActivities(Intent[], Bundle)

启动多个新活动。

(继承自 ContextWrapper)
StartActivity(Intent)

StartActivity(Intent, Bundle) 未指定任何选项相同。

(继承自 ContextWrapper)
StartActivity(Intent, Bundle)

启动新活动。

(继承自 ContextWrapper)
StartActivity(Type)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Context)
StartForeground(Int32, Notification)

如果服务已启动(正在运行 Context#startService(Intent)),则还会使此服务在前台运行,从而在处于此状态时向用户显示正在进行的通知。

(继承自 Service)
StartForeground(Int32, Notification, ForegroundService)

具有其他 foregroundServiceType 参数的 #startForeground(int, Notification) 重载版本。

(继承自 Service)
StartForegroundService(Intent)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
StartInstrumentation(ComponentName, String, Bundle)

开始执行类 Instrumentation

(继承自 ContextWrapper)
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 ContextWrapper)
StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle)

喜欢 StartActivity(Intent, Bundle),但要开始一个 IntentSender。

(继承自 ContextWrapper)
StartService(Intent)

请求启动给定的应用程序服务。

(继承自 ContextWrapper)
StopForeground(Boolean)

旧版的 #stopForeground(int).

(继承自 Service)
StopForeground(StopForegroundFlags)

从前台状态中删除此服务,以便在需要更多内存时将其终止。

(继承自 Service)
StopSelf()

如果服务以前已启动,请停止该服务。

(继承自 Service)
StopSelf(Int32)

#stopSelfResult 版本的该版本不返回结果。

(继承自 Service)
StopSelfResult(Int32)

如果最近启动服务的时间是 <var>startId</var>,请停止该服务。

(继承自 Service)
StopService(Intent)

请求停止给定的应用程序服务。

(继承自 ContextWrapper)
SwitchInputMethod(String)

强制切换到新的输入法,由 <var>id</var> 标识。

SwitchInputMethod(String, InputMethodSubtype)

强制切换到新的输入法,由 id该输入法标识。

SwitchToNextInputMethod(Boolean)

强制切换到下一个输入法和子类型。

SwitchToPreviousInputMethod()

强制切换到上次使用的输入法和子类型。

ToArray<T>()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
ToString()

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

(继承自 Object)
UnbindService(IServiceConnection)

断开与应用程序服务的连接。

(继承自 ContextWrapper)
UnregisterComponentCallbacks(IComponentCallbacks)

ComponentCallbacks删除以前注册#registerComponentCallbacks(ComponentCallbacks)的对象。

(继承自 Context)
UnregisterDeviceIdChangeListener(IIntConsumer)

从上下文中删除设备 ID 更改的侦听器。

(继承自 Context)
UnregisterFromRuntime()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
UnregisterReceiver(BroadcastReceiver)

取消注册以前注册的 BroadcastReceiver。

(继承自 ContextWrapper)
UpdateFullscreenMode()

重新评估输入法是否应在全屏模式下运行,并在自上次评估后更改时更新其 UI。

UpdateInputViewShown()

重新评估软输入区域当前是否应显示,如果这是自上次评估以来发生更改,请更新其 UI。

UpdateServiceGroup(IServiceConnection, Int32, Int32)

对于以前绑定到 #bindService 或相关方法的服务,请更改系统管理该服务相对于其他进程的过程的方式。

(继承自 Context)
Wait()

使当前线程等待,直到唤醒它,通常是通过 em 通知/em> 或 <em>interrupted</em>。<><

(继承自 Object)
Wait(Int64)

使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted</em>>,或直到经过一定数量的实时。

(继承自 Object)
Wait(Int64, Int32)

使当前线程等待直到唤醒,通常是通过 <em>通知</em> 或 <em interrupted</em>>,或直到经过一定数量的实时。

(继承自 Object)

显式接口实现

IJavaPeerable.Disposed()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
IJavaPeerable.DisposeUnlessReferenced()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
IJavaPeerable.Finalized()

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
IJavaPeerable.JniManagedPeerState

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
IJavaPeerable.SetJniIdentityHashCode(Int32)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)
IJavaPeerable.SetPeerReference(JniObjectReference)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

(继承自 Object)

扩展方法

JavaCast<TResult>(IJavaObject)

执行 Android 运行时检查的类型转换。

JavaCast<TResult>(IJavaObject)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

GetJniTypeName(IJavaPeerable)

InputMethodService 提供 InputMethod 的标准实现,最终实现可从中派生和自定义。

适用于