如何动态更改工具栏中命令的 UIID?

How can I dynamically change the UIID for the commands that go in the toolbar?

目前我正在将效果添加到图像,然后将其用作 pressedIcon 图像。

尝试:

Button btn = toolbar.findCommandComponent(cmd);

这将允许您根据自己的选择来操作按钮(例如 setUIID 等)。