Shared Element Transition : Having a view that moves from one activity to another in a smooth motion.

Let’s say you have more than one view to do a shared element transition in your app , how do you do it in Kotlin ?

Below are code snippets for Java and Kotlin

Example :

Shared element transition for image from Grid item to Details page

Java way :

Kotlin way:

or