开发者

I do not know how to animate a component

开发者 https://www.devze.com 2023-03-11 21:46 出处:网络
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 B开发者_开发问答utton is moving downward smoothly before occupying the grid cell area

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 B开发者_开发问答utton is moving downward smoothly before occupying the grid cell area for its position. How to do that animation in 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消