@ 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 .