material-components / material-components/material-components-android
[Animation] windowAnimationStyle no longer animates activities
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Since Material 1.3.0, `android:windowAnimationStyle` appears to be ignored on activity transitions, even when using AppCompat themes, such that activity animations (such as the classic slide animation described below) no longer animate. In fact, there's no longer *any* animation between activities.
**Expected behavior:** Activities using the *AppTheme* style as defined below should animate using the slide in right/left animations as defined in the windowAnimationStyle attribute.
**Source code:**
*AppTheme*
```
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:background">@null</item>
<item name="android:windowAnimationStyle">@style/CustomActivityAnimation</item>
...
<item name="android:activityOpenEnterAnimation">@anim/slide_in_right</item>
<item name="android:activityOpenExitAnimation">@anim/slide_out_left</item>
<item name="android:activityCloseEnterAnimation">@anim/slide_in_left</item>
<item name="android:activityCloseExitAnimation">@anim/slide_out_right</item>
```
*slide_in_right*
```
```
*slide_in_left*
```
```
*slide_out_right*
```
```
*slide_out_left*
```
```
**Android API version:** Android API 28
**Material Library version:** 1.3.0+
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the activity transition with the AppTheme and CustomActivityAnimation styles on Android API 28 using Material Library 1.3.0 or later. Trace how android:windowAnimationStyle and the four activity animations are handled, then verify that opening and closing activities again use the expected slide animations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100