private void obtainDialogMargin ( @ NonNull final TypedArray typedArray ) { int defaultHorizontalMargin = getContext ( ) . getResources ( ) . getDimensionPixelSize ( R . dimen . dialog_horizontal_margin ) ; int defaultVerticalMargin = getContext ( ) . getResources ( ) . getDimensionPixelSize ( R . dimen . dialog_vertical_margin ) ; int left = typedArray . getDimensionPixelSize ( R . styleable . DialogPreference_dialogMarginLeft , defaultHorizontalMargin ) ; int top = typedArray . getDimensionPixelSize ( R . styleable . DialogPreference_dialogMarginTop , defaultVerticalMargin ) ; int right = typedArray . getDimensionPixelSize ( R . styleable . DialogPreference_dialogMarginRight , defaultHorizontalMargin ) ; int bottom = typedArray . getDimensionPixelSize ( R . styleable . DialogPreference_dialogMarginBottom , defaultVerticalMargin ) ; setDialogMargin ( left , top , right , bottom ) ; }
Obtains the margin of the preference s dialog from a specific typed array .