0

Although I do know how to open another activity quite easily, using intent like the below:

Intent intent = new Intent(first.this, second.class);                                   intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
intent.putExtra("selectedApp", ApplicationTitle.getText());
startActivity(intent);

When you use the android application "PlayStore News", when you select a news item rather than just being redirected to another activity. An animation occurs, where in the change between several small cards to one large occurs.

How can I accomplish this?

sshashank124
  • 31,495
  • 9
  • 67
  • 76

3 Answers3

1

You might want to check out https://developer.android.com/training/material/animations.html#Transitions

This explains how to define custom transitions between activities. In particular, you may be interested in shared element transitions. I'd be more specific, but its a fairly broad question

Tim Mutton
  • 756
  • 8
  • 17
1

http://www.mysamplecode.com/2013/02/android-animation-switching-activity.html

There is a method

 overridePendingTransition(R.anim.push_up_in, R.anim.push_up_out);
xenteros
  • 15,586
  • 12
  • 56
  • 91
0

Check this sample code for animation while switching activities in android.

http://android-er.blogspot.in/2013/04/custom-animation-while-switching.html http://www.mysamplecode.com/2013/02/android-animation-switching-activity.html

Ganesh AB
  • 4,652
  • 2
  • 18
  • 29