@ Nullable private CharSequence formatBreadCrumbTitle ( @ Nullable final CharSequence breadCrumbTitle ) { if ( ! TextUtils . isEmpty ( breadCrumbTitle ) && isButtonBarShown ( ) && navigationFragment != null ) { String format = getProgressFormat ( ) ; int selectedNavigationPreferenceIndex = navigationFragment . getSelectedNavigationPreferenceIndex ( ) ; if ( ! TextUtils . isEmpty ( format ) && selectedNavigationPreferenceIndex != - 1 ) { int currentStep = selectedNavigationPreferenceIndex + 1 ; int totalSteps = navigationFragment . getNavigationPreferenceCount ( ) ; return String . format ( format , currentStep , totalSteps , breadCrumbTitle ) ; } } return breadCrumbTitle ; }
Formats a specific bread crumb title depending on whether the activity is used as a wizard and whether the progress should be shown or not .