create

Create HarmonizedColorAttributes with an array of color attributes. If this is called, the resources pointed by the attributes will be resolved at runtime and harmonized. If you're concerned about accidentally overwriting color resources, see create.


open fun create(@NonNull @AttrRes attributes: Array<Int>, @StyleRes themeOverlay: Int): HarmonizedColorAttributes

Create HarmonizedColorAttributes with a theme overlay, along with an array of attributes in the theme overlay.

In this method, instead of the color resource that the color attribute is pointing to in the main theme/context being harmonized directly, the color resource in the theme overlay context will be replaced with the harmonized color attribute instead.