private void initializeShowWizardDialogPreference ( ) { Preference preference = findPreference ( getString ( R . string . show_wizard_dialog_preference_key ) ) ; preference . setOnPreferenceClickListener ( new OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( final Preference preference ) { WizardDialog . Builder builder = new WizardDialog . Builder ( getActivity ( ) , shouldUseFullscreen ( ) ? R . style . DarkFullscreenDialogTheme : 0 ) ; configureHeaderDialogBuilder ( builder ) ; builder . enableTabLayout ( ! shouldHeaderBeShown ( ) ) ; if ( shouldButtonBarDividerBeShown ( ) ) { builder . showButtonBarDivider ( true ) ; } addFragment ( builder , 1 ) ; addFragment ( builder , 2 ) ; addFragment ( builder , 3 ) ; WizardDialog wizardDialog = builder . create ( ) ; if ( shouldUseAnimations ( ) ) { builder . setBackgroundColor ( getResources ( ) . getIntArray ( R . array . wizard_dialog_background_colors ) [ 0 ] ) ; builder . addOnPageChangeListener ( createWizardDialogPageChangeListener ( wizardDialog ) ) ; } wizardDialog . show ( getActivity ( ) . getSupportFragmentManager ( ) , null ) ; return true ; } } ) ; }
Initializes the preference which allows to show a wizard dialog .