Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Changes made to an `animateFloatAsState` call which are built and run on a device/emulator work fine. But subsequently, changes made and refreshed using Live Edit are not properly applied.
In the repro at
1. Badge is scaled in
2. Ripple behind badge is scaled in
3. Ripple is faded out
Each time the up or down button is pressed rapidly the animation is halted and restarted. When it works properly, the user can see that the animation is allowed to complete nearly to completion, with a smooth effect.
### Problem:
When it doesn't work properly, the animation is janky. As the user rapidly hits the button the animations can't keep up and the user does not see the number in the badge or the ripple behind the badge at each change in number. Instead, all that is shown is a small dot, giving the appearance that the animation has sort of frozen and only completes after the user stops hitting the button.
The net effect of this was many lost development hours of trying to tweak the code thinking that something about the code was incorrect or incapable of producing an animation as smooth as the corollary iOS app.
## STEPS TO REPRODUCE:
1. Git clone repro at
2. Build and run the app
3. Notice the up and down buttons can be tapped/clicked as rapidly as possible with a smooth animation showing for each increment/decrement
4. Make a simple change in the `AnimatedBadge` composable such as a scale, alpha or timing value for one or more of the `animatedFloatAsState` calls.
5. DO NOT DO A FULL REBUILD/RE-INSTALL OF THE APP
6. Press the Live Edit "refresh" button at the top right of the "Running Devices" window
7. Expected: animation should be as smooth as step 3
8. Actual: the badge/ripple appear to be frozen at a very small size while the user taps/clicks the up or down button as rapidly as possible
## ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
See live-edit-repro-good.mp4 and live-edit-repro-bad.mp4 for comparison.
------------------
Android Studio Ladybug Feature Drop | 2024.2.2
Build #AI-242.23726.103.2422.12816248, built on December 17, 2024
Runtime version: 21.0.4+-12422083-b607.1 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.1.1
Kotlin plugin: K2 mode (Beta)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 12
Metal Rendering is ON