Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save d4rkc0de/652736c2db2929703a4a702922778ad1 to your computer and use it in GitHub Desktop.
Save d4rkc0de/652736c2db2929703a4a702922778ad1 to your computer and use it in GitHub Desktop.
Exclude the status bar and navigation bar from the window's default exit enter shared element transition
inside onCreate() :
Transition fade = new Fade();
fade.excludeTarget(android.R.id.statusBarBackground, true);
fade.excludeTarget(android.R.id.navigationBarBackground, true);
getWindow().setEnterTransition(fade);
or via xml :
<?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>
@Deep21
Copy link

Deep21 commented May 7, 2018

nice gist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment