我不知道如何为组件设置动画

发布于 2024-11-14 12:57:09 字数 167 浏览 2 评论 0原文

我想在将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

屋檐 2024-11-21 12:57:09

只需将按钮添加到表单中,不要调用重绘/重新验证等,而是调用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文