RemoteViews.RemoteResponse.FromFillInIntent(Intent) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用集合时(例如ListView、StackView 等)在小组件中,在单个项上设置 PendingIntents 非常昂贵,因此不建议这样做。 相反,可以在集合上设置单个 PendingIntent 模板,请参阅 RemoteViews.setPendingIntentTemplate(int,PendingIntent),可以通过在该项上设置 fillInIntent 来区分给定项的单个单击操作。 然后,fillInIntent 与 PendingIntent 模板结合使用,以确定在单击项时将执行的最终意向。 这如下所示:在 PendingIntent 模板中留空但由 fillInIntent 提供的任何字段将被覆盖,生成的 PendingIntent 将被使用。 然后,PendingIntent 模板的其余部分将填充在 fillInIntent 中设置的关联字段。 有关更多详细信息,请参阅 Intent.fillIn(Intent,int)。 创建一个响应,该响应将挂起的意向作为响应的一部分发送。 意向的源边界(Intent.getSourceBounds)将设置为屏幕空间中目标视图的边界。 请注意,在启动意向之前,与 mPendingIntent 关联的任何活动选项都可能会被重写。 另请参阅: SetPendingIntentTemplate(Int32, PendingIntent), SetOnClickFillInIntent(Int32, Intent)。
[Android.Runtime.Register("fromFillInIntent", "(Landroid/content/Intent;)Landroid/widget/RemoteViews$RemoteResponse;", "", ApiSince=29)]
public static Android.Widget.RemoteViews.RemoteResponse FromFillInIntent(Android.Content.Intent fillIntent);
[<Android.Runtime.Register("fromFillInIntent", "(Landroid/content/Intent;)Landroid/widget/RemoteViews$RemoteResponse;", "", ApiSince=29)>]
static member FromFillInIntent : Android.Content.Intent -> Android.Widget.RemoteViews.RemoteResponse
参数
- fillIntent
- Intent
意向:将与父级的 PendingIntent 组合在一起的意向,以确定响应的行为。 此值不能为 null。
返回
此值不能为 null。
- 特性
注解
Java文档RemoteViews.RemoteResponse。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。