private void obtainTextColor(@NonNull final TypedArray typedArray) {
        ColorStateList colorStateList =
                typedArray.getColorStateList(R.styleable.ActionPreference_android_textColor);

        if (colorStateList == null) {
            colorStateList = ContextCompat
                    .getColorStateList(getContext(), R.color.action_preference_text_color);
        }

        setTextColor(colorStateList);
    }
private void obtainTextColor ( @ NonNull final TypedArray typedArray ) { ColorStateList colorStateList = typedArray . getColorStateList ( R . styleable . ActionPreference_android_textColor ) ; if ( colorStateList == null ) { colorStateList = ContextCompat . getColorStateList ( getContext ( ) , R . color . action_preference_text_color ) ; } setTextColor ( colorStateList ) ; }
Obtains the text color of the preference's title from a specific typed array.

@param typedArray
The typed array, the color should be obtained from, as an instance of the class
{@link TypedArray}. The typed array may not be null