Repeat two different animations infinitely in android one after the other
<p>I am trying the following code in Andorid for animations</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.lay);
        rel = (LinearLayout) findViewById(R.id.rel);
        rel.setBackgroundDrawable(getResources().getDrawable(R.drawable.gradient_background));


        animation = new AlphaAnimation(1, 0);
        animation.setDuration(500);
        animation.setInterpolator(new LinearInterpolator());
        animation.setRepeatCount(3);
        rel.startAnimation(animation);

        animation1 = new AlphaAnimation(1, 0);
        animation1.setDuration(1500);
        animation1.setInterpolator(new LinearInterpolator());
        animation1.setRepeatCount(3);

        animationchala();




    }

   public void  animationchala(){
        animation.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            public void onAnimationEnd(Animation animation) {
                animation.setAnimationListener(null);

                rel.startAnimation(animation1);


            }

            @Override
            public void onAnimationRepeat(Animation animation) {
            }
        });

        animation1.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation1) {

            }

            public void onAnimationEnd(Animation animation1) {
                animation1.setAnimationListener(null);
                rel.startAnimation(animation);


            }

            @Override
            public void onAnimationRepeat(Animation animation1) {
            }
        });
    }
</code></pre>

<p>the code works for the first time.</p>

<p>when animation ends animation1 is started , then animation1 ends and animation is started again, but now when animation1 has to start again it stops, how can I repeat the animations one after the other infinitely </p>