I have some ImageView
s 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.
精彩评论