Java 在android studio中完成背景运动图像?
我使用以下代码将图像从右向左移动。我想要的是中途停止图像,然后重置,我想要我的图像克隆自己,并在每个步骤中添加一个从右到左的完整滚动背景Java 在android studio中完成背景运动图像?,java,android,animation,Java,Android,Animation,我使用以下代码将图像从右向左移动。我想要的是中途停止图像,然后重置,我想要我的图像克隆自己,并在每个步骤中添加一个从右到左的完整滚动背景 ImageView img_animation = (ImageView) findViewById(R.id.imageView4); TranslateAnimation animation = new TranslateAnimation(0.0f, -300.0f,0.0f, 0.0f); // new Tr
ImageView img_animation = (ImageView) findViewById(R.id.imageView4);
TranslateAnimation animation = new TranslateAnimation(0.0f, -300.0f,0.0f, 0.0f); // new TranslateAnimation(xFrom,xTo, yFrom,yTo)
animation.setDuration(9000); // animation duration
animation.setRepeatCount(6); // animation repeat count
animation.setRepeatMode(0); // repeat animation (left to right, right to left )
animation.setFillAfter(true);
img_animation.startAnimation(animation);
问题是只有一个图像会移动,但我希望该图像能够自行克隆并从右向左滚动