In my app I have a shared element that looks something like this
<FrameLayout
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/title"
android:layout_margin="16dp"
android:text="Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/image"
android:src="@drawable/hero_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</FrameLayout>
In my activity I mark the image
as the shared element and thus the image transitions to the next activity. However, I want to fade out the title
before the image is transitioning. It looks like I should be able to get this working by using setSharedElementExitTransition()
and setting the title
as a target, but whatever I try, that animation appears not to work and the transitioning image is drawn over the snapshotted title
.
I've read through https://halfthought.wordpress.com/2014/12/08/what-are-all-these-dang-transitions/ by George Mount and looked through his excellent answers here on SO, but I just need a little bit more help :)