get Color
Returns the color int for the provided theme color attribute, using the Context of the provided view
.
Throws
if the attribute is not set in the current theme.
open fun getColor(context: Context, @AttrRes colorAttributeResId: Int, errorMessageComponent: String): Int
Returns the color int for the provided theme color attribute.
Throws
if the attribute is not set in the current theme.
open fun getColor(@NonNull view: View, @AttrRes colorAttributeResId: Int, @ColorInt defaultValue: Int): Int
Returns the color int for the provided theme color attribute, or the default value if the attribute is not set in the current theme, using the view
's Context.
open fun getColor(@NonNull context: Context, @AttrRes colorAttributeResId: Int, @ColorInt defaultValue: Int): Int
Returns the color int for the provided theme color attribute, or the default value if the attribute is not set in the current theme.