SharedElementCallback.OnCaptureSharedElementSnapshot 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建要由远程活动使用的共享元素的快照,并用 #onCreateSnapshotView(android.content.Context, android.os.Parcelable)
该快照进行重建。
[Android.Runtime.Register("onCaptureSharedElementSnapshot", "(Landroid/view/View;Landroid/graphics/Matrix;Landroid/graphics/RectF;)Landroid/os/Parcelable;", "GetOnCaptureSharedElementSnapshot_Landroid_view_View_Landroid_graphics_Matrix_Landroid_graphics_RectF_Handler")]
public virtual Android.OS.IParcelable? OnCaptureSharedElementSnapshot (Android.Views.View? sharedElement, Android.Graphics.Matrix? viewToGlobalMatrix, Android.Graphics.RectF? screenBounds);
[<Android.Runtime.Register("onCaptureSharedElementSnapshot", "(Landroid/view/View;Landroid/graphics/Matrix;Landroid/graphics/RectF;)Landroid/os/Parcelable;", "GetOnCaptureSharedElementSnapshot_Landroid_view_View_Landroid_graphics_Matrix_Landroid_graphics_RectF_Handler")>]
abstract member OnCaptureSharedElementSnapshot : Android.Views.View * Android.Graphics.Matrix * Android.Graphics.RectF -> Android.OS.IParcelable
override this.OnCaptureSharedElementSnapshot : Android.Views.View * Android.Graphics.Matrix * Android.Graphics.RectF -> Android.OS.IParcelable
参数
- sharedElement
- View
要为其创建快照的共享元素视图。
- viewToGlobalMatrix
- Matrix
包含从视图到屏幕坐标的转换的矩阵。
- screenBounds
- RectF
屏幕坐标空间中共享元素的边界。 这是应用 viewToGlobalMatrix 的视图边界。
返回
要与远程活动重新建立#onCreateSnapshotView(android.content.Context, android.os.Parcelable)
并传入和传入和传递#onSharedElementStart(java.util.List, java.util.List, java.util.List)
#onSharedElementEnd(java.util.List, java.util.List, java.util.List)
的远程活动的快照。
- 属性
注解
创建要由远程活动使用的共享元素的快照,并用 #onCreateSnapshotView(android.content.Context, android.os.Parcelable)
该快照进行重建。 null 返回值意味着远程活动将具有 null 快照视图, #onSharedElementStart(java.util.List, java.util.List, java.util.List)
并且 #onSharedElementEnd(java.util.List, java.util.List, java.util.List)
。
这不用于片段转换。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。