Skip to content

Instantly share code, notes, and snippets.

@vtthach
Last active August 15, 2017 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vtthach/71a41270bb29bacd40d56e0bc852e041 to your computer and use it in GitHub Desktop.
Save vtthach/71a41270bb29bacd40d56e0bc852e041 to your computer and use it in GitHub Desktop.
Transition with share element
<style name="AppTheme.Main" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:statusBarColor">@android:color/holo_blue_light</item>
<item name="android:windowEnterTransition">@transition/details_window_enter_transition</item>
<item name="android:windowReturnTransition">@transition/details_window_return_transition</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<fade xmlns:android="http://schemas.android.com/apk/res/android">
<targets>
<target android:excludeId="@android:id/statusBarBackground"/>
<target android:excludeId="@android:id/navigationBarBackground"/>
</targets>
</fade>
<?xml version="1.0" encoding="utf-8"?>
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android"
android:transitionOrdering="together"
android:duration="3500">
<fade>
<targets>
<target android:excludeId="@android:id/statusBarBackground" />
<target android:excludeId="@android:id/navigationBarBackground" />
</targets>
</fade>
<slide android:slideEdge="top" >
<targets>
<target android:targetId="@id/details_header_container" />
</targets>
</slide>
<slide android:slideEdge="bottom">
<targets>
<target android:targetId="@id/details_text_container" />
</targets>
</slide>
</transitionSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment