开发者

Can an View play its animation out of its parent?

I have some ImageViews in a TableLayout's TableRow. When I start an animation of one ImageView using the following code:

ImageVi开发者_如何学Goew image = (ImageView)findViewById(id);
TranslateAnimation a = new TranslateAnimation(0, 0, 0, 80);             
a.setDuration(500);
image.startAnimation(a);

the image is expected to move downwards. But unfortunately it's in a TableRow, so I can see the image moves "in the backstage of the row". Any ideas? I can't use other layouts because of a lot of existing codes.


The answer is no. Animations change properties of an view, but can't take it out of its parent. At last I gave up and use another layout.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜