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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-01-25 UTC.