Delay between two functions of one method android studio : I am new to Android Studio. I want to put delay between Animation of button AND opening of second activity, So that animation runs and then splashActivity opens.





        btn.setOnClickListener(new View.OnClickListener(){
            public void onClick(View arg0){
                Animation anim4 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_anim);
                btn.startAnimation(anim4);

                startActivity(new Intent(MainActivity.this, splashActivity.class));
            }
        });