code: private void obtainButtonBarBackground() {
          try {
              int color =
                      ThemeUtil.getColor(getActivity(), R.attr.restoreDefaultsButtonBarBackground);
              setButtonBarBackgroundColor(color);
          } catch (NotFoundException e) {
              int resourceId = ThemeUtil
                      .getResId(getActivity(), R.attr.restoreDefaultsButtonBarBackground, -1);
  
              if (resourceId != -1) {
                  setButtonBarBackground(resourceId);
              } else {
                  setButtonBarBackgroundColor(
                          ContextCompat.getColor(getActivity(), R.color.button_bar_background_light));
              }
          }
      }
docs: Obtains the background of the button bar from the activity's current theme.