Androids overridePendingTransition and singleInstance

I am stuck in a problem with overridePendingTransition not working after changing launchMode activity to 'singleInstance. I'd love to hear your inputs on it

I am working on an application for navigating a deck of cards. To keep things simple, suppose the application contains two actions: card_deck and card . Clicking anywhere on the card_deck operation opens the card activity . Then you can scroll left or right on the activity of the card to open the next / previous card from the deck. I have a neat input and output animation that occurs when scrolling a map .

This is what the Android activity stack would look like,

enter image description here

As you might have guessed, there are too many types of card activity .

I changed the startMode of the map activity from standard to singleInstace (I had one more reason related to adMob to go along the singleInstance route). Now, when I call the following code snippet, the animation no longer occurs.

from Card.class

Intent intent = new Intent(activity, Card.class);
activity.startActivity(intent);
activity.overridePendingTransition(enterAnim, exitAnim);

I think the animation is suppressed because there will be only one action such as a map, and it will not be called onCreate ("because it makes one instance"). I also tried calling overridePendingTransition () on onNewIntent () / onResume (), but that didn't help.

In short, how could I display input and output animations when calling startActivity (activity, A.class) from A.class when "A has startMode singleTop / singleInstance

+4

All Articles