material-components / material-components/material-components-android
[BaseTransientBottomBar] Animation time is too long
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Description: Snackbar animation time at the beginning and end is too long, including slide animation and fade animation, in Theme.MaterialComponents.
Expected behavior:
animationSlideDuration is 250, which is R.attr.motionDurationShort4
animationFadeInDuration is 150, which is R.attr.motionDurationShort2
animationFadeOutDuration is 75, which is R.attr.motionDurationShort1
Source code:
animationSlideDuration = MotionUtils.resolveThemeDuration(context, R.attr.motionDurationLong2,
DEFAULT_SLIDE_ANIMATION_DURATION);
animationFadeInDuration = MotionUtils.resolveThemeDuration(context, R.attr.motionDurationLong2,
DEFAULT_ANIMATION_FADE_IN_DURATION);
animationFadeOutDuration =
MotionUtils.resolveThemeDuration(
context, R.attr.motionDurationMedium1, DEFAULT_ANIMATION_FADE_OUT_DURATION);
Minimal sample app repro:
SnackBarTest.zip
Android API version: 29
Material Library version: 1.9.0-alpha02
Device: HONOR 9X
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the BaseTransientBottomBar animation-duration code shown in the issue and compare each resolved theme attribute with the expected short-duration attributes. Use the provided SnackBarTest.zip sample app to verify the slide and fade timings; done means the three durations resolve as specified on the reported setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100