private Preference.OnPreferenceClickListener createActionPreferenceClickListener() {
        return new Preference.OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(Preference preference) {
                Toast.makeText(getActivity(), R.string.action_preference_toast, Toast.LENGTH_SHORT)
                        .show();
                return true;
            }

        };
    }
private Preference . OnPreferenceClickListener createActionPreferenceClickListener ( ) { return new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { Toast . makeText ( getActivity ( ) , R . string . action_preference_toast , Toast . LENGTH_SHORT ) . show ( ) ; return true ; } } ; }
Creates and returns a listener, which allows to show a toast, when the {@link
ActionPreference} has been clicked.

@return The listener, which has been created, as an instance of the type {@link
Preference.OnPreferenceClickListener}