Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BottomAppBar] Fix bug where FAB shadow would "bounce" when the posit…
…ion changed. There are two related fixes involved here: 1. The horizontal shift animations were using the default CABasicAnimation timing function, Linear. These have been adjusted to EaseInEaseOut to match the guidelines. 2. The shadow was doing a wonky "bounce" animation by always animating to an elevation of 1 followed by an animation to the target elevation. This bounce animation has been removed. Note that, while the bouncing has been removed, the shadow now does not animate at all. This is intentional for two reasons: 1. The shadow is expected to swap z-ordering with the bottom bar. 2. The animation is very subtle. The result of these two constraints is that if we animate the shadow to the secondary position, then we need to change the z-order at the end of the animation. This would result in the shadow being "clipped" by the bar as the shadow moves from the foreground to the background. This ends up being more visible than the animation itself, and more distracting than the lack of an animation. We could animate to the primary position, but at this point handling this logic would add complexity for a very subtle effect that doesn't necessarily improve the effect. PiperOrigin-RevId: 326713093
- Loading branch information