Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity Transition error, cannot resolve symbol '@transition/explode'

I am trying out Activity Transitions and when I paste below code in my values-21/styles.xml I get error:

cannot resolve symbol '@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>
like image 426
T_C Avatar asked Jan 28 '15 01:01

T_C


People also ask

What is Cannot resolve symbol in Android Studio?

Most often “R cannot be resolved” error appears if there is an issue with some of your resource files. Due to this error, you are unable to build your application. That's why we need to solve this error as it not getting away by just doing a simple restart or hitting Alt+Enter.

What is transition animation in Android?

Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending layout.


2 Answers

Simplest Answer - Replace it with @android:transition/explode

like image 138
Amit Patel Avatar answered Sep 23 '22 00:09

Amit Patel


Did you create a res/transition/explode.xml file with the following contents?

<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
    <explode />
</transitionSet>
like image 34
Alex Lockwood Avatar answered Sep 27 '22 00:09

Alex Lockwood