code: private void obtainDialogHeight(@NonNull final TypedArray typedArray) {
          int height = 0;
  
          try {
              height = typedArray
                      .getDimensionPixelSize(R.styleable.DialogPreference_dialogHeight, height);
          } catch (Resources.NotFoundException | UnsupportedOperationException e) {
              height = typedArray.getInteger(0, height);
          }
  
          if (height != 0) {
              setDialogHeight(height);
          }
      }
docs: Obtains the height of the preference's dialog from a specific typed array.
  
  @param typedArray
  The typed array, the height should be obtained from, as an instance of the class
  {@link TypedArray} the typed array may not be null