By using a repeating image like this,
is it possible to create animation like this?
bottom to top infinite animation i implement this way. it's too easy just use two image and animated one after another.
Inside MainActivity.java
imageView_background1 = (ImageView) findViewById(R.id.imageView_background1);
imageView_background1.setVisibility(View.GONE);
imageView_background1.setVisibility(View.VISIBLE);
Animation mAnimation = new TranslateAnimation(
TranslateAnimation.ABSOLUTE, 0f,
TranslateAnimation.ABSOLUTE, 0f,
TranslateAnimation.RELATIVE_TO_PARENT, 0f,
TranslateAnimation.RELATIVE_TO_PARENT, -1f);
mAnimation.setDuration(10000);
mAnimation.setRepeatCount(-1);
mAnimation.setRepeatMode(Animation.INFINITE);
mAnimation.setInterpolator(new LinearInterpolator());
imageView_background1.setAnimation(mAnimation);
imageView_background2 = (ImageView) findViewById(R.id.imageView_background2);
imageView_background2.setVisibility(View.VISIBLE);
Animation mAnimation1 = new TranslateAnimation(
TranslateAnimation.ABSOLUTE, 0f,
TranslateAnimation.ABSOLUTE, 0f,
TranslateAnimation.RELATIVE_TO_SELF, 1f,
TranslateAnimation.RELATIVE_TO_SELF, 0f);
mAnimation1.setDuration(10000);
mAnimation1.setRepeatCount(-1);
mAnimation1.setRepeatMode(Animation.INFINITE);
mAnimation1.setInterpolator(new LinearInterpolator());
imageView_background2.setAnimation(mAnimation1);
Inside activity_main.xml (use same image both imageview)