Kotlin — Quick Shared Element transition trick

android•Mar 10, 2019

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 ?

We would like to transition multiple views like in this example :


Shared element transition for image from Grid item to Details page

Below are code snippets for both Java and Kotlin

Java way :

Kotlin way:

or


Adit Lal

json[

        Ad-hoc polymorphism in JSON with Kotlin

a year ago•4 min read](/web/20200814163833/https://www.aditlal.dev/polymorphic-json/)dsl[

        Kotlin DSL - let's express code in "mini-language" - Part 5 of 5

a year ago•3 min read](/web/20200814163833/https://www.aditlal.dev/kotlin-dsl-part-5/)dsl[

        Kotlin DSL - let's express code in "mini-language" - Part 4 of 5

a year ago•2 min read](/web/20200814163833/https://www.aditlal.dev/kotlin-dsl-part-4/)

  No results for your search, please try with something else.

Adit Lal © 2020  •  Published with Ghost

JavaScript license information

cookie-bar {background:#090a0b; height:auto; line-height:24px; color:#fff; text-align:center; padding:3px 0;}

cookie-bar.fixed {position:fixed; top:0; left:0; width:100%;}

cookie-bar.fixed.bottom {bottom:0; top:auto;}

cookie-bar p {margin:0; padding:0;}

cookie-bar a {color:#ffffff; display:inline-block; border-radius:3px; text-decoration:none; padding:0 6px; margin-left:8px;}

cookie-bar .cb-enable {background:#26a8ed;}

cookie-bar .cb-enable:hover {background:#26a8ed;}

cookie-bar .cb-disable {background:#26a8ed;}

cookie-bar .cb-disable:hover {background:#26a8ed;}

cookie-bar .cb-policy {background:#26a8ed;}

cookie-bar .cb-policy:hover {background:#26a8ed;}

When choosing a first cosplay outfit, it is worth considering how details related to character accuracy will affect the complete look. When the final look will be photographed, it helps to assess details related to wig colour selection together with fit and fabric. To review details related to cosplay accessories before the event, women's cosplay costumes for photoshoots can help narrow the options for a specific purpose. For an outfit that feels convincing, a balanced view of details related to game cosplay costumes can support both detail and comfort.