private void addNavigationPreference ( ) { NavigationPreference navigationPreference = new NavigationPreference ( this ) ; navigationPreference . setTitle ( getPreferenceHeaderTitle ( ) ) ; navigationPreference . setFragment ( NewPreferenceHeaderFragment . class . getName ( ) ) ; getNavigationFragment ( ) . getPreferenceScreen ( ) . addPreference ( navigationPreference ) ; invalidateOptionsMenu ( ) ; }
Dynamically adds a new navigation preference to the activity .