code: private void adaptButtonBarVisibility() {
          if (buttonBarParent != null) {
              buttonBarParent.setVisibility(showRestoreDefaultsButton ? View.VISIBLE : View.GONE);
          }
      }
docs: Adapts the visibility of the button bar.