Share via


IInputConnection.PreviewHandwritingGesture Method

Definition

Preview a handwriting gesture on text.

[Android.Runtime.Register("previewHandwritingGesture", "(Landroid/view/inputmethod/PreviewableHandwritingGesture;Landroid/os/CancellationSignal;)Z", "GetPreviewHandwritingGesture_Landroid_view_inputmethod_PreviewableHandwritingGesture_Landroid_os_CancellationSignal_Handler:Android.Views.InputMethods.IInputConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
public virtual bool PreviewHandwritingGesture (Android.Views.InputMethods.PreviewableHandwritingGesture gesture, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("previewHandwritingGesture", "(Landroid/view/inputmethod/PreviewableHandwritingGesture;Landroid/os/CancellationSignal;)Z", "GetPreviewHandwritingGesture_Landroid_view_inputmethod_PreviewableHandwritingGesture_Landroid_os_CancellationSignal_Handler:Android.Views.InputMethods.IInputConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
abstract member PreviewHandwritingGesture : Android.Views.InputMethods.PreviewableHandwritingGesture * Android.OS.CancellationSignal -> bool
override this.PreviewHandwritingGesture : Android.Views.InputMethods.PreviewableHandwritingGesture * Android.OS.CancellationSignal -> bool

Parameters

gesture
PreviewableHandwritingGesture

the gesture to preview. Preview support for a gesture (regardless of whether implemented by editor) can be determined if gesture subclasses PreviewableHandwritingGesture. Supported previewable gestures include SelectGesture, SelectRangeGesture, DeleteGesture and DeleteRangeGesture.

cancellationSignal
CancellationSignal

signal to cancel an ongoing preview.

Returns

true on successfully sending command to Editor, false if not implemented by editor or the input connection is no longer valid or preview was cancelled with CancellationSignal.

Attributes

Remarks

Preview a handwriting gesture on text. Provides a real-time preview for a gesture to user for an ongoing gesture. e.g. as user begins to draw a circle around text, resulting selection SelectGesture is previewed while stylus is moving over applicable text.

Note: A supported gesture EditorInfo#getSupportedHandwritingGestures() might not have preview supported EditorInfo#getSupportedHandwritingGesturePreviews().

Java documentation for android.view.inputmethod.InputConnection.previewHandwritingGesture(android.view.inputmethod.PreviewableHandwritingGesture, android.os.CancellationSignal).

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