code: private View inflateButtonBar() {
          if (getRootView() != null) {
              if (buttonBarContainer == null) {
                  LayoutInflater layoutInflater = LayoutInflater.from(getContext());
                  buttonBarContainer = (ViewGroup) layoutInflater
                          .inflate(R.layout.button_bar_container, getRootView(), false);
                  buttonBarDivider = buttonBarContainer.findViewById(R.id.button_bar_divider);
              }
  
              if (buttonBarContainer.getChildCount() > 1) {
                  buttonBarContainer.removeViewAt(1);
              }
  
              if (customButtonBarView != null) {
                  buttonBarContainer.addView(customButtonBarView);
              } else if (customButtonBarViewId != -1) {
                  LayoutInflater layoutInflater = LayoutInflater.from(getContext());
                  View view =
                          layoutInflater.inflate(customButtonBarViewId, buttonBarContainer, false);
                  buttonBarContainer.addView(view);
              } else {
                  LayoutInflater layoutInflater = LayoutInflater.from(getContext());
                  View view = layoutInflater.inflate(
                          stackButtons ? R.layout.stacked_button_bar : R.layout.horizontal_button_bar,
                          buttonBarContainer, false);
                  buttonBarContainer.addView(view);
              }
  
              View positiveButtonView = buttonBarContainer.findViewById(android.R.id.button1);
              View negativeButtonView = buttonBarContainer.findViewById(android.R.id.button2);
              View neutralButtonView = buttonBarContainer.findViewById(android.R.id.button3);
              positiveButton =
                      positiveButtonView instanceof Button ? (Button) positiveButtonView : null;
              negativeButton =
                      negativeButtonView instanceof Button ? (Button) negativeButtonView : null;
              neutralButton = neutralButtonView instanceof Button ? (Button) neutralButtonView : null;
              return buttonBarContainer;
          }
  
          return null;
      }
docs: Inflates the layout, which is used to show the dialog's buttons.
  
  @return The view, which has been inflated, as an instance of the class {@link View} or null,
  if no view has been inflated