material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[Toolbar] Drawable of menu item icon set wrong callback.

Open AlexMofer opened this issue 10 months ago • 0 comments

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:

    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

Android API version: 34

Material Library version: 1.11.0

Device: Any Device

AlexMofer avatar Apr 18 '24 14:04 AlexMofer