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