private void obtainDialogTheme ( @ NonNull final TypedArray typedArray ) { int themeId = typedArray . getResourceId ( R . styleable . DialogPreference_dialogThemeResource , 0 ) ; if ( themeId == 0 ) { TypedValue typedValue = new TypedValue ( ) ; getContext ( ) . getTheme ( ) . resolveAttribute ( R . attr . preferenceDialogTheme , typedValue , true ) ; themeId = typedValue . resourceId ; } dialogTheme = themeId != 0 ? themeId : R . style . MaterialDialog_Light ; }
Obtains the theme which should be used by the preference s dialog from a specific typed array .