Skip to content

Commit

Permalink
[ExtendedFloatingActionButton] Update extend/shrink motion spec
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 468201647
  • Loading branch information
imhappi authored and leticiarossi committed Aug 17, 2022
1 parent 16edbb9 commit 9db041c
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="width"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="@interpolator/mtrl_fast_out_slow_in"/>
<objectAnimator
android:propertyName="height"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedAccelerateInterpolator"/>
<objectAnimator
android:propertyName="paddingStart"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedAccelerateInterpolator"/>
<objectAnimator
android:propertyName="paddingEnd"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedAccelerateInterpolator"/>
<objectAnimator
android:propertyName="labelOpacity"
android:startOffset="?attr/motionDurationShort1"
android:duration="?attr/motionDurationShort2"
android:interpolator="?attr/motionEasingEmphasizedAccelerateInterpolator"/>
</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="width"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedInterpolator"/>
<objectAnimator
android:propertyName="height"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedInterpolator"/>
<objectAnimator
android:propertyName="paddingStart"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedInterpolator"/>
<objectAnimator
android:propertyName="paddingEnd"
android:startOffset="0"
android:duration="?attr/motionDurationLong2"
android:interpolator="?attr/motionEasingEmphasizedInterpolator"/>
<objectAnimator
android:propertyName="labelOpacity"
android:startOffset="?attr/motionDurationShort2"
android:duration="?attr/motionDurationShort4"
android:interpolator="?attr/motionEasingEmphasizedDecelerateInterpolator"/>
</set>
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@
<item name="enforceMaterialTheme">true</item>
<item name="showMotionSpec">@animator/m3_extended_fab_show_motion_spec</item>
<item name="hideMotionSpec">@animator/m3_extended_fab_hide_motion_spec</item>
<item name="extendMotionSpec">@animator/m3_extended_fab_change_size_expand_motion_spec</item>
<item name="shrinkMotionSpec">@animator/m3_extended_fab_change_size_collapse_motion_spec</item>
</style>

<style name="Widget.Material3.ExtendedFloatingActionButton.Primary" parent="Base.Widget.Material3.ExtendedFloatingActionButton">
Expand Down

0 comments on commit 9db041c

Please sign in to comment.