Skip to content

Commit 0d91f4a

Browse files
hunterstichveganafro
authored andcommitted
[Motion] Add motion easing xml interpolators and theme attributes.
PiperOrigin-RevId: 435639751
1 parent 5173944 commit 0d91f4a

19 files changed

+393
-19
lines changed

lib/java/com/google/android/material/dialog/res/values/themes_base.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@
187187
<item name="shapeAppearanceLargeComponent">@style/ShapeAppearance.Material3.LargeComponent</item>
188188

189189
<!-- Motion-->
190+
<item name="motionEasingStandardInterpolator">@interpolator/m3_sys_motion_easing_standard</item>
191+
<item name="motionEasingStandardDecelerateInterpolator">@interpolator/m3_sys_motion_easing_standard_decelerate</item>
192+
<item name="motionEasingStandardAccelerateInterpolator">@interpolator/m3_sys_motion_easing_standard_accelerate</item>
193+
<item name="motionEasingEmphasizedInterpolator">@interpolator/m3_sys_motion_easing_emphasized</item>
194+
<item name="motionEasingEmphasizedDecelerateInterpolator">@interpolator/m3_sys_motion_easing_emphasized_decelerate</item>
195+
<item name="motionEasingEmphasizedAccelerateInterpolator">@interpolator/m3_sys_motion_easing_emphasized_accelerate</item>
196+
<item name="motionEasingLinearInterpolator">@interpolator/m3_sys_motion_easing_linear</item>
190197
<item name="motionEasingStandard">@string/m3_sys_motion_easing_standard</item>
191198
<item name="motionEasingEmphasized">@string/m3_sys_motion_easing_emphasized</item>
192199
<item name="motionEasingDecelerated">@string/m3_sys_motion_easing_legacy_decelerate</item>
@@ -386,6 +393,13 @@
386393
<item name="shapeAppearanceLargeComponent">@style/ShapeAppearance.Material3.LargeComponent</item>
387394

388395
<!-- Motion-->
396+
<item name="motionEasingStandardInterpolator">@interpolator/m3_sys_motion_easing_standard</item>
397+
<item name="motionEasingStandardDecelerateInterpolator">@interpolator/m3_sys_motion_easing_standard_decelerate</item>
398+
<item name="motionEasingStandardAccelerateInterpolator">@interpolator/m3_sys_motion_easing_standard_accelerate</item>
399+
<item name="motionEasingEmphasizedInterpolator">@interpolator/m3_sys_motion_easing_emphasized</item>
400+
<item name="motionEasingEmphasizedDecelerateInterpolator">@interpolator/m3_sys_motion_easing_emphasized_decelerate</item>
401+
<item name="motionEasingEmphasizedAccelerateInterpolator">@interpolator/m3_sys_motion_easing_emphasized_accelerate</item>
402+
<item name="motionEasingLinearInterpolator">@interpolator/m3_sys_motion_easing_linear</item>
389403
<item name="motionEasingStandard">@string/m3_sys_motion_easing_standard</item>
390404
<item name="motionEasingEmphasized">@string/m3_sys_motion_easing_emphasized</item>
391405
<item name="motionEasingDecelerated">@string/m3_sys_motion_easing_legacy_decelerate</item>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Copyright (C) 2022 The Android Open Source Project
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<resources>
18+
19+
<public name="motionEasingStandardInterpolator" type="attr" />
20+
<public name="motionEasingStandardDecelerateInterpolator" type="attr" />
21+
<public name="motionEasingStandardAccelerateInterpolator" type="attr" />
22+
<public name="motionEasingEmphasizedInterpolator" type="attr" />
23+
<public name="motionEasingEmphasizedDecelerateInterpolator" type="attr" />
24+
<public name="motionEasingEmphasizedAccelerateInterpolator" type="attr" />
25+
<public name="motionEasingLinearInterpolator" type="attr" />
26+
27+
</resources>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:pathData="@string/m3_sys_motion_easing_emphasized_path_data" />
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:controlX1="@dimen/m3_sys_motion_easing_emphasized_accelerate_control_x1"
20+
android:controlY1="@dimen/m3_sys_motion_easing_emphasized_accelerate_control_y1"
21+
android:controlX2="@dimen/m3_sys_motion_easing_emphasized_accelerate_control_x2"
22+
android:controlY2="@dimen/m3_sys_motion_easing_emphasized_accelerate_control_y2"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:controlX1="@dimen/m3_sys_motion_easing_emphasized_decelerate_control_x1"
20+
android:controlY1="@dimen/m3_sys_motion_easing_emphasized_decelerate_control_y1"
21+
android:controlX2="@dimen/m3_sys_motion_easing_emphasized_decelerate_control_x2"
22+
android:controlY2="@dimen/m3_sys_motion_easing_emphasized_decelerate_control_y2"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:controlX1="@dimen/m3_sys_motion_easing_linear_control_x1"
20+
android:controlY1="@dimen/m3_sys_motion_easing_linear_control_y1"
21+
android:controlX2="@dimen/m3_sys_motion_easing_linear_control_x2"
22+
android:controlY2="@dimen/m3_sys_motion_easing_linear_control_y2"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:controlX1="@dimen/m3_sys_motion_easing_standard_control_x1"
20+
android:controlY1="@dimen/m3_sys_motion_easing_standard_control_y1"
21+
android:controlX2="@dimen/m3_sys_motion_easing_standard_control_x2"
22+
android:controlY2="@dimen/m3_sys_motion_easing_standard_control_y2"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:controlX1="@dimen/m3_sys_motion_easing_standard_accelerate_control_x1"
20+
android:controlY1="@dimen/m3_sys_motion_easing_standard_accelerate_control_y1"
21+
android:controlX2="@dimen/m3_sys_motion_easing_standard_accelerate_control_x2"
22+
android:controlY2="@dimen/m3_sys_motion_easing_standard_accelerate_control_y2"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:controlX1="@dimen/m3_sys_motion_easing_standard_decelerate_control_x1"
20+
android:controlY1="@dimen/m3_sys_motion_easing_standard_decelerate_control_y1"
21+
android:controlX2="@dimen/m3_sys_motion_easing_standard_decelerate_control_x2"
22+
android:controlY2="@dimen/m3_sys_motion_easing_standard_decelerate_control_y2"/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<accelerateDecelerateInterpolator />

0 commit comments

Comments
 (0)