2

Not quite sure how to explain it, so showing some codes will definitely help me.

Intent i = new Intent(Main.this, screen1.class);
    i.putExtra("uid", username);
    i.putExtra("pwd", password);
    startActivity(i);

    /** Fading Transition Effect */
    overridePendingTransition(R.anim.fadein, R.anim.fadeout);

I want to start another activity while passing some strings over with intent. My problem is the overridePendingTransition is not working I believe because of the intent.

I know when ever I do this:

        startActivity(new Intent(Main.this,
            screen1.class));
       Main.this.finish();

    /** Fading Transition Effect */
    overridePendingTransition(R.anim.fadein, R.anim.fadeout);

The overridePendingTransition works just fine.

Could anyone help please?

Pallavi Tapkir
  • 781
  • 7
  • 28
John Nguyen
  • 547
  • 1
  • 11
  • 25
  • the problem is when i start another activity using intent, the overridePendingTransition doesnt work. – John Nguyen May 08 '12 at 21:57
  • Did you see this?: http://stackoverflow.com/questions/4633543/overridependingtransition-does-not-work-when-flag-activity-reorder-to-front-is-u – Urban May 08 '12 at 22:22

1 Answers1

3

Try

Intent i = new Intent(Main.this, screen1.class);
i.putExtra("uid", username);
i.putExtra("pwd", password);
startActivity(i);

/** Fading Transition Effect */
Main.this.overridePendingTransition(R.anim.fadein, R.anim.fadeout);
ababzy
  • 687
  • 10
  • 16