SharedElementCallback.OnSharedElementsArrived Method

Definition

Called during an Activity Transition when the shared elements have arrived at the final location and are ready to be transferred.

[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

Parameters

sharedElementNames
IList<String>

List: The names of the shared elements that are being transferred..

sharedElements
IList<View>

List: The shared elements that are part of the View hierarchy.

listener
SharedElementCallback.IOnSharedElementsReadyListener

SharedElementCallback.OnSharedElementsReadyListener: The listener to call when the shared elements are ready to be hidden in the source Activity or shown in the destination Activity.

Attributes

Remarks

Called during an Activity Transition when the shared elements have arrived at the final location and are ready to be transferred. This method is called for both the source and destination Activities. When the shared elements are ready to be transferred, OnSharedElementsReadyListener.onSharedElementsReady() must be called to trigger the transfer. The default behavior is to trigger the transfer immediately.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

Android reference for android.app.SharedElementCallback.onSharedElementsArrived.

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