DynamicColorsOptions

public class DynamicColorsOptions
extends Object

java.lang.Object
   ↳ com.google.android.material.color.DynamicColorsOptions


Wrapper class for specifying dynamic colors options when applying dynamic colors. Clients have the options to provide a custom theme overlay, set the precondition that decides if dynamic colors should be applied, set the callback method and/or set the color source image to apply content-based dynamic colors.

Summary

Nested classes

class DynamicColorsOptions.Builder

Builder class for specifying options when applying dynamic colors. 

Public methods

Integer getContentBasedSeedColor()

Returns the seed color extracted from the color source image.

DynamicColors.OnAppliedCallback getOnAppliedCallback()

Returns the callback method after dynamic colors have been applied.

DynamicColors.Precondition getPrecondition()

Returns the precondition that decides if dynamic colors should be applied.

int getThemeOverlay()

Returns the resource ID of the theme overlay that provides dynamic color definition.

Inherited methods

Public methods

getContentBasedSeedColor

public Integer getContentBasedSeedColor ()

Returns the seed color extracted from the color source image.

Returns
Integer

getOnAppliedCallback

public DynamicColors.OnAppliedCallback getOnAppliedCallback ()

Returns the callback method after dynamic colors have been applied.

Returns
DynamicColors.OnAppliedCallback

getPrecondition

public DynamicColors.Precondition getPrecondition ()

Returns the precondition that decides if dynamic colors should be applied.

Returns
DynamicColors.Precondition

getThemeOverlay

public int getThemeOverlay ()

Returns the resource ID of the theme overlay that provides dynamic color definition.

Returns
int