code: private void adaptButtonBarVisibility() {
          if (buttonBarContainer != null) {
              buttonBarContainer.setVisibility(buttonBarShown ? View.VISIBLE : View.GONE);
          }
      }
docs: Adapts the visibility of the dialog's buttons.