简体   繁体   English

Android-小部件上的动画

[英]Android - Animation on widgets

I started with a simple animation on button, I am successful to an extent, 我从按钮上的简单动画开始,在某种程度上我很成功,

The problem i am facing is, I am able to animate the button but the position of listener, Even after button is animated the clickable area is not animated , It is resting at the original postion 我面临的问题是,我可以对按钮进行动画处理,但是听众的位置,即使按钮被动画化之后,可点击区域也没有被动画化,它停留在原始位置上

Could some one help me with an useful code snippet or suggestion 有人可以帮我提供有用的代码段或建议吗

Regards 问候

Android animations can not change the layout of buttons or view in general. 通常,Android动画无法更改按钮或视图的布局。 Only their image will appear to move, but they will stay in the same place. 只有它们的图像看起来会移动,但是它们将留在同一位置。 After the animation is finished, get the Layout parameters through View.getLayoutParams() and change them. 动画完成后,通过View.getLayoutParams()获取Layout参数并进行更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM