@NonNull
    private View.OnClickListener createNextButtonListener() {
        return new View.OnClickListener() {

            @Override
            public void onClick(final View v) {
                if (navigationFragment != null) {
                    int currentIndex = navigationFragment.getSelectedNavigationPreferenceIndex();

                    if (currentIndex < navigationFragment.getNavigationPreferenceCount() - 1) {
                        Bundle params = notifyOnNextStep();

                        if (params != null) {
                            navigationFragment.selectNavigationPreference(currentIndex + 1, params);
                        }
                    }
                }
            }

        };
    }
@ NonNull private View . OnClickListener createNextButtonListener ( ) { return new View . OnClickListener ( ) { @ Override public void onClick ( final View v ) { if ( navigationFragment != null ) { int currentIndex = navigationFragment . getSelectedNavigationPreferenceIndex ( ) ; if ( currentIndex < navigationFragment . getNavigationPreferenceCount ( ) - 1 ) { Bundle params = notifyOnNextStep ( ) ; if ( params != null ) { navigationFragment . selectNavigationPreference ( currentIndex + 1 , params ) ; } } } } } ; }
Returns a listener, which allows to proceed to the next step, when the activity is used as a
wizard.

@return The listener, which has been created, as an instance of the type {@link
View.OnClickListener}. The listener may not be null