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