InputMethodService.EnableHardwareAcceleration Method

Definition

Caution

deprecated

You can call this to try to enable accelerated drawing for your IME.

[Android.Runtime.Register("enableHardwareAcceleration", "()Z", "GetEnableHardwareAccelerationHandler")]
[System.Obsolete("deprecated")]
public virtual bool EnableHardwareAcceleration ();
[<Android.Runtime.Register("enableHardwareAcceleration", "()Z", "GetEnableHardwareAccelerationHandler")>]
[<System.Obsolete("deprecated")>]
abstract member EnableHardwareAcceleration : unit -> bool
override this.EnableHardwareAcceleration : unit -> bool

Returns

true if accelerated drawing is successfully enabled otherwise false. On API 21 and later devices the return value is basically just a hint and your IME does not need to change the behavior based on the it

Attributes

Remarks

You can call this to try to enable accelerated drawing for your IME. This must be set before #onCreate(), so you will typically call it in your constructor. It is not always possible to use hardware accelerated drawing in an IME (for example on low-end devices that do not have the resources to support this), so the call true if it succeeds otherwise false if you will need to draw in software. You must be able to handle either case.

In API 21 and later, system may automatically enable hardware accelerated drawing for your IME on capable devices even if this method is not explicitly called. Make sure that your IME is able to handle either case.

This member is deprecated. Starting in API 21, hardware acceleration is always enabled on capable devices

Java documentation for android.inputmethodservice.InputMethodService.enableHardwareAcceleration().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to