From 23a2b173554540b74b12ece3bc953e78fcc0a177 Mon Sep 17 00:00:00 2001 From: conradchen Date: Tue, 11 Apr 2023 08:57:03 -0700 Subject: [PATCH] [Switch] Fix morphing time of switch thumbs The switch thumb position animation time is hard-coded by SwitchCompat and we have no way to override it. Therefore, the morphing time has to follow the position animation time, instead of the design spec. Resolves https://github.com/material-components/material-components-android/issues/3340 PiperOrigin-RevId: 523415316 --- .../material/materialswitch/res/values/integers.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/java/com/google/android/material/materialswitch/res/values/integers.xml b/lib/java/com/google/android/material/materialswitch/res/values/integers.xml index 52f2f71cbfb..163cebef211 100644 --- a/lib/java/com/google/android/material/materialswitch/res/values/integers.xml +++ b/lib/java/com/google/android/material/materialswitch/res/values/integers.xml @@ -16,10 +16,15 @@ --> - @integer/m3_sys_motion_duration_medium4 - @integer/m3_sys_motion_duration_short3 - @integer/m3_sys_motion_duration_medium1 - @integer/m3_sys_motion_duration_short3 + + @integer/m3_sys_motion_duration_medium1 + @integer/m3_sys_motion_duration_short2 + @integer/m3_sys_motion_duration_short3 + @integer/m3_sys_motion_duration_short2 32 16