DynamicColorsOptions.Builder

public class DynamicColorsOptions.Builder


Builder class for specifying options when applying dynamic colors.

Summary

Public constructors

Public methods

DynamicColorsOptions
DynamicColorsOptions.Builder
setContentBasedSource(Bitmap contentBasedSource)

Sets the content based source image from which to extract the seed color for the Material color palette.

DynamicColorsOptions.Builder
setContentBasedSource(int contentBasedSource)

Sets the content based source color to generate Material color palette.

DynamicColorsOptions.Builder

Sets the callback method for after the dynamic colors have been applied.

DynamicColorsOptions.Builder

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

DynamicColorsOptions.Builder
setThemeOverlay(int themeOverlay)

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

Public constructors

Builder

public Builder()

Public methods

build

public DynamicColorsOptions build()

setContentBasedSource

public DynamicColorsOptions.Builder setContentBasedSource(Bitmap contentBasedSource)

Sets the content based source image from which to extract the seed color for the Material color palette. Calling this method will clear any source color previously set with #setContentBasedSource(int).

setContentBasedSource

public DynamicColorsOptions.Builder setContentBasedSource(int contentBasedSource)

Sets the content based source color to generate Material color palette. Calling this method will clear any source bitmap previously set with #setContentBasedSource(Bitmap).

setOnAppliedCallback

public DynamicColorsOptions.Builder setOnAppliedCallback(
    DynamicColors.OnAppliedCallback onAppliedCallback
)

Sets the callback method for after the dynamic colors have been applied.

setPrecondition

public DynamicColorsOptions.Builder setPrecondition(DynamicColors.Precondition precondition)

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

setThemeOverlay

public DynamicColorsOptions.Builder setThemeOverlay(int themeOverlay)

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