다음을 통해 공유


View.OnReceiveContent(ContentInfo) Method

Definition

Implements the default behavior for receiving content for this type of view.

[Android.Runtime.Register("onReceiveContent", "(Landroid/view/ContentInfo;)Landroid/view/ContentInfo;", "GetOnReceiveContent_Landroid_view_ContentInfo_Handler", ApiSince=31)]
public virtual Android.Views.ContentInfo? OnReceiveContent (Android.Views.ContentInfo payload);
[<Android.Runtime.Register("onReceiveContent", "(Landroid/view/ContentInfo;)Landroid/view/ContentInfo;", "GetOnReceiveContent_Landroid_view_ContentInfo_Handler", ApiSince=31)>]
abstract member OnReceiveContent : Android.Views.ContentInfo -> Android.Views.ContentInfo
override this.OnReceiveContent : Android.Views.ContentInfo -> Android.Views.ContentInfo

Parameters

payload
ContentInfo

The content to insert and related metadata.

Returns

The portion of the passed-in content that was not handled (may be all, some, or none of the passed-in content).

Attributes

Remarks

Implements the default behavior for receiving content for this type of view. The default view implementation is a no-op (returns the passed-in content without acting on it).

Widgets should override this method to define their default behavior for receiving content. Apps should #setOnReceiveContentListener set a listener to provide app-specific handling for receiving content.

See #setOnReceiveContentListener and #performReceiveContent for more info.

Java documentation for android.view.View.onReceiveContent(android.view.ContentInfo).

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