Search code examples
androidshared-element-transition

Is there a connection between Shared element transition and the app Theme?


I have a program that i made in android studio which uses shared element transition, the problem is that i have a title bar that i want to remove and when i remove it for example:

<style name="AppTheme" parent="android:Theme.Light.NoTitleBar">

the shared element transition stop working, and when i return to the old theme:

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">

the shared element transition start working again.

why there's a connection between those features and how can i fix this problem? Thank you all.

for sdk version: minSdkVersion 21 targetSdkVersion 24


Solution

  • Yes, there are various settings within a theme that affect shared element transitions. Most of them contain the word windowSharedElement<something>