@ NonNull private View . OnClickListener createBackButtonListener ( ) { return new View . OnClickListener ( ) { @ Override public void onClick ( final View v ) { if ( navigationFragment != null ) { int currentIndex = navigationFragment . getSelectedNavigationPreferenceIndex ( ) ; if ( currentIndex > 0 ) { Bundle params = notifyOnPreviousStep ( ) ; if ( params != null ) { navigationFragment . selectNavigationPreference ( currentIndex - 1 , params ) ; } } } } } ; }
Returns a listener which allows to resume to the previous step when the activity is used as a wizard .