Skip to content

Commit c63bd59

Browse files
committed
Restore animation
1 parent fde4a53 commit c63bd59

7 files changed

Lines changed: 117 additions & 2 deletions

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
4040
android:exported="false"
4141
android:launchMode="singleTask"
42-
android:theme="@style/AppTheme.Axis" />
42+
android:theme="@style/AppTheme.Animated" />
4343

4444
<!--share to clippy activities-->
4545

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<set xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:shareInterpolator="false"
4+
android:showBackdrop="true">
5+
<alpha
6+
android:duration="@integer/m3_sys_motion_duration_long1"
7+
android:fillAfter="true"
8+
android:fillBefore="true"
9+
android:fillEnabled="true"
10+
android:fromAlpha="0"
11+
android:interpolator="@interpolator/m3_sys_motion_easing_standard_decelerate"
12+
android:startOffset="100"
13+
android:toAlpha="1"
14+
tools:ignore="PrivateResource" />
15+
<translate
16+
android:duration="@integer/m3_sys_motion_duration_long1"
17+
android:fillAfter="true"
18+
android:fillBefore="true"
19+
android:fillEnabled="true"
20+
android:fromXDelta="-25%"
21+
android:interpolator="@interpolator/m3_sys_motion_easing_emphasized"
22+
android:startOffset="0"
23+
android:toXDelta="0"
24+
tools:ignore="PrivateResource" />
25+
</set>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<set xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:shareInterpolator="false">
4+
<alpha
5+
android:duration="@integer/m3_sys_motion_duration_short2"
6+
android:fillAfter="true"
7+
android:fillBefore="true"
8+
android:fillEnabled="true"
9+
android:fromAlpha="1"
10+
android:interpolator="@interpolator/m3_sys_motion_easing_standard_accelerate"
11+
android:startOffset="0"
12+
android:toAlpha="0"
13+
tools:ignore="PrivateResource" />
14+
<translate
15+
android:duration="@integer/m3_sys_motion_duration_long1"
16+
android:fillAfter="true"
17+
android:fillBefore="true"
18+
android:fillEnabled="true"
19+
android:fromXDelta="0"
20+
android:interpolator="@interpolator/m3_sys_motion_easing_emphasized"
21+
android:startOffset="0"
22+
android:toXDelta="25%"
23+
tools:ignore="PrivateResource" />
24+
</set>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<set xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:shareInterpolator="false"
4+
android:showBackdrop="true">
5+
<alpha
6+
android:duration="@integer/m3_sys_motion_duration_long1"
7+
android:fillAfter="true"
8+
android:fillBefore="true"
9+
android:fillEnabled="true"
10+
android:fromAlpha="0"
11+
android:interpolator="@interpolator/m3_sys_motion_easing_standard_decelerate"
12+
android:startOffset="100"
13+
android:toAlpha="1"
14+
tools:ignore="PrivateResource" />
15+
<translate
16+
android:duration="@integer/m3_sys_motion_duration_long1"
17+
android:fillAfter="true"
18+
android:fillBefore="true"
19+
android:fillEnabled="true"
20+
android:fromXDelta="25%"
21+
android:interpolator="@interpolator/m3_sys_motion_easing_emphasized"
22+
android:startOffset="0"
23+
android:toXDelta="0"
24+
tools:ignore="PrivateResource" />
25+
</set>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<set xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:shareInterpolator="false">
4+
<alpha
5+
android:duration="@integer/m3_sys_motion_duration_short2"
6+
android:fillAfter="true"
7+
android:fillBefore="true"
8+
android:fillEnabled="true"
9+
android:fromAlpha="1"
10+
android:interpolator="@interpolator/m3_sys_motion_easing_standard_accelerate"
11+
android:startOffset="0"
12+
android:toAlpha="0"
13+
tools:ignore="PrivateResource" />
14+
<translate
15+
android:duration="@integer/m3_sys_motion_duration_long1"
16+
android:fillAfter="true"
17+
android:fillBefore="true"
18+
android:fillEnabled="true"
19+
android:fromXDelta="0"
20+
android:interpolator="@interpolator/m3_sys_motion_easing_emphasized"
21+
android:startOffset="0"
22+
android:toXDelta="-25%"
23+
tools:ignore="PrivateResource" />
24+
</set>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<resources>
2+
3+
<!--app theme animated with window animation-->
4+
5+
<style name="AppTheme.Animated" parent="@style/AppTheme.Base">
6+
<item name="android:windowAnimationStyle">@style/Animation.SharedXAxis</item>
7+
</style>
8+
9+
<!--activity with shared x-axis animation-->
10+
11+
<style name="Animation.SharedXAxis" parent="@android:style/Animation.Activity">
12+
<item name="android:activityOpenEnterAnimation">@anim/shared_x_axis_activity_open_enter</item>
13+
<item name="android:activityOpenExitAnimation">@anim/shared_x_axis_activity_open_exit</item>
14+
<item name="android:activityCloseEnterAnimation">@anim/shared_x_axis_activity_close_enter</item>
15+
<item name="android:activityCloseExitAnimation">@anim/shared_x_axis_activity_close_exit</item>
16+
</style>
17+
</resources>

app/src/main/res/values/themes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!--app theme axis-->
88

9-
<style name="AppTheme.Axis" parent="@style/AppTheme.Base" />
9+
<style name="AppTheme.Animated" parent="@style/AppTheme.Base" />
1010

1111
<!--app theme transparent-->
1212

0 commit comments

Comments
 (0)