【发布时间】:2017-04-28 23:32:07
【问题描述】:
这对我不起作用。我正在尝试更改颜色 当我按下按钮时。
Form hi = new Form("Layout Animations", new BoxLayout(BoxLayout.Y_AXIS));
Button button = new Button("button");
Label l = new Label(" ");
l.setUIID("DestinationUIID");
l.getAllStyles().setFgColor(0xff0000);
Label l$ = new Label("Label");
l$.setUIID("DestinationUIID");
l$.getAllStyles().setFgColor(0x00ff00);
hi.add(l$);
ComponentAnimation ca = l$.createStyleAnimation("DestinationUIID", 2000);
l$.getAnimationManager().addAnimation(ca, () -> onCompletion());
button.addActionListener((e) -> {
//l$.animate();
l$.getAllStyles().setFgColor(0xff0000);
l$.animate();
//hi.getContentPane().animateHierarchyFade(2000, 0);
});
hi.add(button);
hi.show();
我不了解 UIID 的概念或动画的语法。
【问题讨论】:
标签: label codenameone opacity foreground