code: private void initializeDynamicPreferenceButton() {
          Button dynamicPreferenceButton = findViewById(R.id.dynamic_preference_button);
          dynamicPreferenceButton.setOnClickListener(createDynamicPreferenceButtonListener());
      }
docs: Initializes the button, which allows to show a {@link PreferenceActivity} , whose headers can
  be added or removed dynamically at runtime.