語言

SharedElementCallback.OnCaptureSharedElementSnapshot 方法

定義

建立一個共享元素的快照,供遠端活動使用,並以 重新組合。#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

共用元素 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)重建。 空回傳值表示遠端活動在 onSharedElementStart(java.util.List, java.util.List, java.util.List) 和 onSharedElementEnd(java.util.List, java.util.List, java.util.List) 中會有空快照。 這不適用於碎片轉換。

Android 參考資料。android.app.SharedElementCallback.onCaptureSharedElementSnapshot

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於