private void obtainHintColor ( @ NonNull final TypedArray typedArray ) { ColorStateList colors = typedArray . getColorStateList ( R . styleable . Spinner_android_textColorHint ) ; if ( colors == null ) { TypedArray styledAttributes = getContext ( ) . getTheme ( ) . obtainStyledAttributes ( new int [ ] { android . R . attr . textColorSecondary } ) ; colors = ColorStateList . valueOf ( styledAttributes . getColor ( 0 , 0 ) ) ; } setHintTextColor ( colors ) ; }
Obtains the color of the hint which should be shown when no item is selected from a specific typed array .