Android studio splash screen animation lag

  • Replies:1
Tanner
  • Forum posts: 1

May 17, 2017, 1:08:46 AM via Website

I am trying to create a splash screen with one simple rotate animation but it is very slow and choppy when I run it does anyone know what the issue might be and how I can fix this? Thank you

/** Called when the activity is first created. */

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash_screen);

    Animation anim = AnimationUtils.loadAnimation(getBaseContext(), R.anim.rotate);
    ImageView iv = (ImageView) findViewById(R.id.splash);
    iv.startAnimation(anim);
    anim.setAnimationListener(new Animation.AnimationListener() {
        @Override
        public void onAnimationStart(Animation animation){

        }
        @Override
        public void onAnimationEnd(Animation animation){
            Intent i = new Intent(getBaseContext(), MainActivity.class);
            startActivity(i);
        }

        @Override
        public void onAnimationRepeat(Animation animation) {

        }
    });
}

}

Deactivated Account

Reply
Dev Lt
  • Forum posts: 54

May 17, 2017, 2:49:35 PM via Website

please post your R.anim.rotate xml code

Reply