语言

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

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

返回

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

特性

注解

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

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

有关详细信息,请参阅 #setOnReceiveContentListener 和 #performReceiveContent 了解详细信息。

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

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

适用于