다음을 통해 공유


IScrollCaptureCallback.OnScrollCaptureSearch Method

Definition

The system is searching for the appropriate scrolling container to capture and would like to know the size and position of scrolling content handled by this callback.

[Android.Runtime.Register("onScrollCaptureSearch", "(Landroid/os/CancellationSignal;Ljava/util/function/Consumer;)V", "GetOnScrollCaptureSearch_Landroid_os_CancellationSignal_Ljava_util_function_Consumer_Handler:Android.Views.IScrollCaptureCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public void OnScrollCaptureSearch (Android.OS.CancellationSignal signal, Java.Util.Functions.IConsumer onReady);
[<Android.Runtime.Register("onScrollCaptureSearch", "(Landroid/os/CancellationSignal;Ljava/util/function/Consumer;)V", "GetOnScrollCaptureSearch_Landroid_os_CancellationSignal_Ljava_util_function_Consumer_Handler:Android.Views.IScrollCaptureCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member OnScrollCaptureSearch : Android.OS.CancellationSignal * Java.Util.Functions.IConsumer -> unit

Parameters

signal
CancellationSignal

signal to cancel the operation in progress

onReady
IConsumer

consumer for the updated rectangle

Attributes

Remarks

The system is searching for the appropriate scrolling container to capture and would like to know the size and position of scrolling content handled by this callback.

To determine scroll bounds, an implementation should inset the visible bounds of the containing view to cover only the area where scrolling content may be positioned. This should cover only the content which tracks with scrolling movement.

Return the updated rectangle to Consumer#accept onReady.accept. If for any reason the scrolling content is not available to capture, a empty rectangle may be returned which will exclude this view from consideration.

This request may be cancelled via the provided CancellationSignal. When this happens, any future call to Consumer#accept onReady.accept will have no effect and this content will be omitted from the search results.

Java documentation for android.view.ScrollCaptureCallback.onScrollCaptureSearch(android.os.CancellationSignal, java.util.function.Consumer<android.graphics.Rect>).

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