I want to create a "maximizing" effect from a dialog into my full activity, so I want the opening animation to show the activity expanding from a box to full size.
The stock launcher has done this this since Jelly Bean (pressing an app shortcut will zoom into the application from that icon's location and the Recent Apps menu has done this since ICS.
If both application have the same signature (meaning that both APPS are yours and signed with the same key), you can call your other app activity as follows: Intent LaunchIntent = getActivity(). getPackageManager(). getLaunchIntentForPackage(CALC_PACKAGE_NAME); startActivity(LaunchIntent);
The Recents screen (also referred to as the Overview screen, recent task list, or recent apps) is a system-level UI that lists recently accessed activities and tasks. The user can navigate through the list and select a task to resume, or the user can remove a task from the list by swiping it away.
Figured it out!
Bundle options = ActivityOptionsCompat.makeScaleUpAnimation(
findViewById(android.R.id.content),
findViewById(android.R.id.content).getLeft(),
findViewById(android.R.id.content).getTop(),
findViewById(android.R.id.content).getWidth(),
findViewById(android.R.id.content).getHeight()).toBundle();
startActivity(intent, options);
It only works on API 16 and above, so put a check for it and use the plain old startActivity
for older versions.
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