Share via


SharedElementCallback.OnCreateSnapshotView(Context, IParcelable) Method

Definition

Reconstitutes a snapshot View from a Parcelable returned in #onCaptureSharedElementSnapshot(android.view.View, android.graphics.Matrix, android.graphics.RectF) to be used in #onSharedElementStart(java.util.List, java.util.List, java.util.List) and #onSharedElementEnd(java.util.List, java.util.List, java.util.List).

[Android.Runtime.Register("onCreateSnapshotView", "(Landroid/content/Context;Landroid/os/Parcelable;)Landroid/view/View;", "GetOnCreateSnapshotView_Landroid_content_Context_Landroid_os_Parcelable_Handler")]
public virtual Android.Views.View? OnCreateSnapshotView (Android.Content.Context? context, Android.OS.IParcelable? snapshot);
[<Android.Runtime.Register("onCreateSnapshotView", "(Landroid/content/Context;Landroid/os/Parcelable;)Landroid/view/View;", "GetOnCreateSnapshotView_Landroid_content_Context_Landroid_os_Parcelable_Handler")>]
abstract member OnCreateSnapshotView : Android.Content.Context * Android.OS.IParcelable -> Android.Views.View
override this.OnCreateSnapshotView : Android.Content.Context * Android.OS.IParcelable -> Android.Views.View

Parameters

context
Context

The Context used to create the snapshot View.

snapshot
IParcelable

The Parcelable returned by #onCaptureSharedElementSnapshot( android.view.View, android.graphics.Matrix, android.graphics.RectF).

Returns

A View to be sent in #onSharedElementStart(java.util.List, java.util.List, java.util.List) and #onSharedElementEnd(java.util.List, java.util.List, java.util.List). A null value will produce a null snapshot value for those two methods.

Attributes

Remarks

Reconstitutes a snapshot View from a Parcelable returned in #onCaptureSharedElementSnapshot(android.view.View, android.graphics.Matrix, android.graphics.RectF) to be used in #onSharedElementStart(java.util.List, java.util.List, java.util.List) and #onSharedElementEnd(java.util.List, java.util.List, java.util.List). The returned View will be sized and positioned after this call so that it is ready to be added to the decor View's overlay.

This is not called for Fragment Transitions.

Java documentation for android.app.SharedElementCallback.onCreateSnapshotView(android.content.Context, android.os.Parcelable).

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.

Applies to