I am building an android app, and I want to be able to have a custom transition from one of the activities to another. when I press a button on the first activity I want it to reduce its size and go to the one of the corners of the screen until it disappears, and the second activity is called. Of course, during the resizing and moving the first activity, the second activity will begin to show itself (what I want to say is, during this time, I don’t want to have a black screen underneath). Does someone have experience with this kind of stuff? I also want to note that I am building my app for API 3.0+ so it is ok to use newer functions and methods. Thx!
Share
You should be able to use a simple scale animation for this. In the second activity you can do something like:
For the animations it’d be:
scale_to_corner.xml
and scale_from_corner.xml
This will make your first activity shrink into the top left corner while your second activity grows from the bottom right corner. If you want to change the point in which they grow from or shrink to, you can just change the pivotX and pivotY.