code: private void obtainDialogGravity(@NonNull final TypedArray typedArray) {
          int gravity = typedArray.getInteger(R.styleable.DialogPreference_dialogGravity, -1);
          setDialogGravity(gravity);
      }
docs: Obtains the gravity of the preference's dialog from a specific typed array.
  
  @param typedArray
  The typed array, the gravity should be obtained from, as an instance of the class
  {@link TypedArray}. The typed array may not be null