IInputConnection.RequestTextBoundsInfo(RectF, IExecutor, IConsumer) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called by input method to request the TextBoundsInfo
for a range of text which is
covered by or in vicinity of the given bounds
.
[Android.Runtime.Register("requestTextBoundsInfo", "(Landroid/graphics/RectF;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetRequestTextBoundsInfo_Landroid_graphics_RectF_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler:Android.Views.InputMethods.IInputConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
public virtual void RequestTextBoundsInfo (Android.Graphics.RectF bounds, Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer consumer);
[<Android.Runtime.Register("requestTextBoundsInfo", "(Landroid/graphics/RectF;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetRequestTextBoundsInfo_Landroid_graphics_RectF_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler:Android.Views.InputMethods.IInputConnection, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
abstract member RequestTextBoundsInfo : Android.Graphics.RectF * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.RequestTextBoundsInfo : Android.Graphics.RectF * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
Parameters
- bounds
- RectF
the interested area where the text bounds are requested, in the screen coordinates.
- executor
- IExecutor
the executor to run the callback.
- consumer
- IConsumer
the callback invoked by editor to return the result. It must return a non-null object.
- Attributes
Remarks
Called by input method to request the TextBoundsInfo
for a range of text which is covered by or in vicinity of the given bounds
. It can be used as a supplementary method to implement the handwriting gesture API - #performHandwritingGesture(HandwritingGesture, Executor, IntConsumer)
.
<strong>Editor authors</strong>: It's preferred that the editor returns a TextBoundsInfo
of all the text lines whose bounds intersect with the given bounds
.
<strong>IME authors</strong>: This method is expensive when the text is long. Please consider that both the text bounds computation and IPC round-trip to send the data are time consuming. It's preferable to only request text bounds in smaller areas.
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.