Just as the title says...
I'm using a transition between activities, and I'd like to have some kind of listener (or event) for both activities, for when the transition has finished and for just before it started.
Here's a sample code of creating the transition:
final Intent intent = new Intent(activity, TargetActivity.class);
if (initialQuery != null)
intent.putExtra(EXTRA_INITIAL_QUERY, initialQuery);
final String transitionName = activity.getString(R.string.transition_name);
ViewCompat.setTransitionName(viewToTransitionFromAndTo, transitionName);
final ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity,
viewToTransitionFromAndTo, transitionName);
ActivityCompat.startActivityForResult(activity, intent, requestCode, options.toBundle());