Stay organized with collections
Save and categorize content based on your preferences.
OnSharedElementsReadyListener
interface OnSharedElementsReadyListener
Listener to be called after android.app.SharedElementCallback#onSharedElementsArrived(java.util.List,java.util.List,android.app.SharedElementCallback.OnSharedElementsReadyListener)
when the shared elements are ready to be hidden in the source Activity and shown in the destination Activity.
Summary
Public methods
onSharedElementsReady
abstract fun onSharedElementsReady(): Unit
Call this method during or after the OnSharedElementsReadyListener has been received in SharedElementCallback.onSharedElementsArrived(List, List,
to indicate that the shared elements are ready to be hidden in the source and shown in the destination Activity.
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 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# SharedElementCallback.OnSharedElementsReadyListener\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnSharedElementsReadyListener\n=============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/SharedElementCallback.OnSharedElementsReadyListener \"View this page in Java\") \n\n```\ninterface OnSharedElementsReadyListener\n```\n\n|----------------------------------------------------------------------|\n| [android.app.SharedElementCallback.OnSharedElementsReadyListener](#) |\n\nListener to be called after [android.app.SharedElementCallback#onSharedElementsArrived(java.util.List,java.util.List,android.app.SharedElementCallback.OnSharedElementsReadyListener)](/reference/kotlin/android/app/SharedElementCallback#onSharedElementsArrived(kotlin.collections.MutableList,%20kotlin.collections.MutableList,%20android.app.SharedElementCallback.OnSharedElementsReadyListener)) when the shared elements are ready to be hidden in the source Activity and shown in the destination Activity.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSharedElementsReady](#onSharedElementsReady())`()` Call this method during or after the OnSharedElementsReadyListener has been received in [SharedElementCallback.onSharedElementsArrived(List, List,](/reference/kotlin/android/app/SharedElementCallback#onSharedElementsArrived(kotlin.collections.MutableList,%20kotlin.collections.MutableList,%20android.app.SharedElementCallback.OnSharedElementsReadyListener)) to indicate that the shared elements are ready to be hidden in the source and shown in the destination Activity. |\n\nPublic methods\n--------------\n\n### onSharedElementsReady\n\nAdded in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSharedElementsReady(): Unit\n```\n\nCall this method during or after the OnSharedElementsReadyListener has been received in [SharedElementCallback.onSharedElementsArrived(List, List,](/reference/kotlin/android/app/SharedElementCallback#onSharedElementsArrived(kotlin.collections.MutableList,%20kotlin.collections.MutableList,%20android.app.SharedElementCallback.OnSharedElementsReadyListener)) to indicate that the shared elements are ready to be hidden in the source and shown in the destination Activity."]]