SharedElementCallback.OnCaptureSharedElementSnapshot Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a snapshot of a shared element to be used by the remote Activity and reconstituted
with #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
Parameters
- sharedElement
- View
The shared element View to create a snapshot for.
- viewToGlobalMatrix
- Matrix
A matrix containing a transform from the view to the screen coordinates.
- screenBounds
- RectF
The bounds of shared element in screen coordinate space. This is the bounds of the view with the viewToGlobalMatrix applied.
Returns
A snapshot to send to the remote Activity to be reconstituted with
#onCreateSnapshotView(android.content.Context, android.os.Parcelable)
and passed
into #onSharedElementStart(java.util.List, java.util.List, java.util.List)
and
#onSharedElementEnd(java.util.List, java.util.List, java.util.List)
.
- Attributes
Remarks
Creates a snapshot of a shared element to be used by the remote Activity and reconstituted with #onCreateSnapshotView(android.content.Context, android.os.Parcelable)
. A null return value will mean that the remote Activity will have a null snapshot View in #onSharedElementStart(java.util.List, java.util.List, java.util.List)
and #onSharedElementEnd(java.util.List, java.util.List, java.util.List)
.
This is not called for Fragment Transitions.
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.