SharedElementCallback.OnSharedElementsArrived 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在活動轉換期間呼叫,當共享元素抵達最終位置並準備轉移時。
[Android.Runtime.Register("onSharedElementsArrived", "(Ljava/util/List;Ljava/util/List;Landroid/app/SharedElementCallback$OnSharedElementsReadyListener;)V", "GetOnSharedElementsArrived_Ljava_util_List_Ljava_util_List_Landroid_app_SharedElementCallback_OnSharedElementsReadyListener_Handler", ApiSince=23)]
public virtual void OnSharedElementsArrived(System.Collections.Generic.IList<string>? sharedElementNames, System.Collections.Generic.IList<Android.Views.View>? sharedElements, Android.App.SharedElementCallback.IOnSharedElementsReadyListener? listener);
[<Android.Runtime.Register("onSharedElementsArrived", "(Ljava/util/List;Ljava/util/List;Landroid/app/SharedElementCallback$OnSharedElementsReadyListener;)V", "GetOnSharedElementsArrived_Ljava_util_List_Ljava_util_List_Landroid_app_SharedElementCallback_OnSharedElementsReadyListener_Handler", ApiSince=23)>]
abstract member OnSharedElementsArrived : System.Collections.Generic.IList<string> * System.Collections.Generic.IList<Android.Views.View> * Android.App.SharedElementCallback.IOnSharedElementsReadyListener -> unit
override this.OnSharedElementsArrived : System.Collections.Generic.IList<string> * System.Collections.Generic.IList<Android.Views.View> * Android.App.SharedElementCallback.IOnSharedElementsReadyListener -> unit
參數
SharedElementCallback.OnSharedElementsReadyListener:當共享元素準備好隱藏於來源活動或顯示於目的地活動時,可呼叫的監聽器。
- 屬性
備註
在活動轉換期間呼叫,當共享元素抵達最終位置並準備轉移時。 此方法同時用於來源與目的活動。 當共享元素準備好傳輸時,必須呼叫 OnSharedElementsReadyListener.onSharedElementsReady() 來觸發傳輸。 預設行為是立即觸發傳輸。
本頁內容與程式碼範例受內容授權條款所規範。 Java 和 OpenJDK 是 Oracle 和/或其關係企業的商標或注冊商標。
最後更新於 2026-08-03 UTC。
Android 參考資料。android.app.SharedElementCallback.onSharedElementsArrived
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。