code: private void obtainCardViewBackgroundColor() {
          int color;
  
          try {
              color = ThemeUtil.getColor(this, R.attr.cardViewBackgroundColor);
          } catch (NotFoundException e) {
              color = ContextCompat.getColor(this, R.color.card_view_background_light);
          }
  
          setCardViewBackgroundColor(color);
      }
docs: Obtains the background color of the card view, which contains the currently shown preference
  fragment, when using the split screen layout, from the activity's theme.