View.OnReceiveContent(ContentInfo) 方法

定义

实现接收此类型视图内容的默认行为。

[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

参数

payload
ContentInfo

要插入的内容和相关元数据。

返回

未 (处理的传入内容部分可能是) 全部、部分或全部传入内容。

属性

注解

实现接收此类型视图内容的默认行为。 默认的视图实现是无操作 (返回传入的内容,而不) 对其进行操作。

小组件应重写此方法,以定义其接收内容的默认行为。 应用应 #setOnReceiveContentListener set a listener 为接收内容提供特定于应用的处理。

有关详细信息,请参阅 #setOnReceiveContentListener#performReceiveContent

android.view.View.onReceiveContent(android.view.ContentInfo)Java 文档。

此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。

适用于