我不知道如何为组件设置动画
我想在将 Button
添加到 Form
时对其进行动画处理,其布局管理器是 GridLayout(2,2);
我想要那个Button
在占据其位置的网格单元区域之前平滑地向下移动。如何在 LWUIT 中制作该动画?
I want to animate a Button
when it is added to a Form
, which layout manager is a GridLayout(2,2);
I want that the Button
is moving downward smoothly before occupying the grid cell area for its position. How to do that animation in LWUIT?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需将按钮添加到表单中,不要调用重绘/重新验证等,而是调用
myForm.animateLayout(500);
。显然,这仅适用于 1.5 或更高版本,您可以在 LWUIT 演示的动画和布局部分中看到相关示例。
Just add the button to the form and don't invoke repaint/revalidate etc. instead invoke
myForm.animateLayout(500);
.This will only work on 1.5 or newer obviously, you can see samples of this in the animation and layout sections in the LWUIT demo.