code: private void obtainDialogBackground(@NonNull final TypedArray typedArray) {
          int resourceId =
                  typedArray.getResourceId(R.styleable.DialogPreference_dialogBackground, -1);
  
          if (resourceId != -1) {
              setDialogBackground(resourceId);
          } else {
              int color = typedArray.getColor(R.styleable.DialogPreference_dialogBackground, -1);
  
              if (color != -1) {
                  setDialogBackgroundColor(color);
              }
          }
      }
docs: Obtains the background of the dialog, which is shown by the preference, from a specific typed
  array.
  
  @param typedArray
  The typed array, the background should be obtained from, as an instance of the class
  {@link TypedArray}. The typed array may not be null