SharedElementCallback newListener = null; if (callback != null) { newListener = new SharedElementCallbackImpl(callback); } return newListener;
activity.finishAfterTransition();
activity.postponeEnterTransition();
activity.setEnterSharedElementCallback(createCallback(callback));
activity.setExitSharedElementCallback(createCallback(callback));
activity.startPostponedEnterTransition();