code: private void setHeaderBackground(int colorResId, int drawableResId) {
          if (drawableResId == -1) {
              try {
                  header.setBackgroundColor(getResources().getColor(colorResId));
              } catch (Resources.NotFoundException e) {
                  e.printStackTrace();
              }
          } else {
              try {
                  header.setBackgroundDrawable(getResources().getDrawable(drawableResId));
              } catch (Resources.NotFoundException e) {
                  e.printStackTrace();
              }
          }
  
      }
docs: Set the background color of the header
  
  @param colorResId    Resource Id of the color
  @param drawableResId Resource Id of the drawable