我正在尝试Activity Transitions,当我在我的values-21 / styles.xml中粘贴下面的代码时,我收到错误:
无法解析符号'@ transition / explode'
<style name="BaseAppTheme" parent="android:Theme.Material">
<!-- enable window content transitions -->
<item name="android:windowContentTransitions">true</item>
<!-- specify enter and exit transitions -->
<item name="android:windowEnterTransition">@transition/explode</item>
<item name="android:windowExitTransition">@transition/explode</item>
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform</item>
</style>
答案 0 :(得分:33)
最简单的答案 - 将其替换为@android:transition / explode
答案 1 :(得分:31)
您是否使用以下内容创建了res/transition/explode.xml
文件?
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
<explode />
</transitionSet>