android.transition.Transition.TransitionListener Java Examples

The following examples show how to use android.transition.Transition.TransitionListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java    From Material-SearchTransition with MIT License 6 votes vote down vote up
private TransitionListener navigateToSearchWhenDone() {
    return new SimpleTransitionListener() {
        @Override
        public void onTransitionEnd(Transition transition) {
            Intent intent = new Intent(MainActivity.this, SearchActivity.class);
            startActivity(intent);

            // we are handing the enter transitions ourselves
            // this line overrides that
            overridePendingTransition(0, 0);

            // by this point of execution we have animated the 'expansion' of the Toolbar and hidden its contents.
            // We are half way there. Continue to the SearchActivity to finish the animation
        }
    };
}