private void obtainWindowBackground ( @ StyleRes final int themeResourceId ) { TypedArray typedArray = getContext ( ) . getTheme ( ) . obtainStyledAttributes ( themeResourceId , new int [ ] { R . attr . materialDialogWindowBackground } ) ; int resourceId = typedArray . getResourceId ( 0 , 0 ) ; if ( resourceId != 0 ) { setWindowBackground ( resourceId ) ; } else { setWindowBackground ( R . drawable . material_dialog_background ) ; } }
Obtains the window background from a specific theme .