material-components / material-components/material-components-android
[Toolbar] Drawable of menu item icon set wrong callback.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Animatable drawable not keep running after expand hide menu items. Drawable of menu item icon set wrong callback.
**Expected behavior:** Drawable callback MUST BE CORRECT.
**Source code:**
```java
private static void startAnimate(MenuItem item) {
if (item == null) {
return;
}
final Drawable icon = item.getIcon();
if (icon instanceof Animatable) {
((Animatable) icon).start();
}
}
```
**Minimal sample app repro:** [ToolbarBug.zip](https://github.com/material-components/material-components-android/files/15025988/ToolbarBug.zip)
**Android API version:** 34
**Material Library version:** 1.11.0
**Device:** Any Device
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 with the startAnimate(MenuItem item) snippet in the issue and reproduce the behavior using the linked ToolbarBug.zip sample on Android API 34 with Material Library 1.11.0. Trace the menu item's Drawable callback during expand and hide, then verify that the animatable icon continues running with the correct callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100