I'm trying to accomplish the following Activity transition in Android:
In 1 we see an usual ListView. Now (2), when I place my finger on a ListView element and slide my finger to the left, all the other ListView elements move away, except the one which has my finger on it. If the transition if completed, the "selected" ListView element expands over the screen and shows some content.
Question: Is this transition possible with stock API functions?
If you are targeting JellyBean or above, you may use ActivityOptions class to customize the activity launch animation.
Following is pseudo code for achieving this:
Intent i = //the intent for the new activity
View v = //the selected list item
Bundle bundle = ActivityOptions.makeScaleUpAnimation(v, 0, 0, v.getWidth(), v.getHeight()).toBundle();
startActivity(i, bundle);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With