private void obtainHeaderIcon ( @ StyleRes final int themeResourceId ) { TypedArray typedArray = getContext ( ) . getTheme ( ) . obtainStyledAttributes ( themeResourceId , new int [ ] { R . attr . materialDialogHeaderIcon } ) ; int resourceId = typedArray . getResourceId ( 0 , 0 ) ; if ( resourceId != 0 ) { setHeaderIcon ( resourceId ) ; } }
Obtains the icon of the dialog s header from a specific theme .