我想知道如何在特定页面上复出后重复动画。当您访问某个活动时,我的动画基本上会将 RelativeLayout 向下转换几个像素。但是,如果我然后单击将我发送到不同页面的按钮,然后单击后退按钮返回,则 TranslationAnimation 不会再次启动。
这是代码:
RelativeLayout r1;
r1 = findViewById(R.id.r1);
TranslateAnimation a = new TranslateAnimation(0,0,-10f,0);
a.setDuration(800);
a.setFillAfter(true);
r1.startAnimation(a);
每次访问我的活动时,我究竟如何让这个动画重新启动?
BIG阳
潇潇雨雨
相关分类