DynamicColorsOptions.Builder
public
static
class
DynamicColorsOptions.Builder
extends Object
java.lang.Object | |
↳ | com.google.android.material.color.DynamicColorsOptions.Builder |
Builder class for specifying options when applying dynamic colors.
Summary
Public constructors | |
---|---|
Builder()
|
Public methods | |
---|---|
DynamicColorsOptions
|
build()
|
DynamicColorsOptions.Builder
|
setOnAppliedCallback(DynamicColors.OnAppliedCallback onAppliedCallback)
Sets the callback method for after the dynamic colors have been applied. |
DynamicColorsOptions.Builder
|
setPrecondition(DynamicColors.Precondition precondition)
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. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder ()
Public methods
setOnAppliedCallback
public DynamicColorsOptions.Builder setOnAppliedCallback (DynamicColors.OnAppliedCallback onAppliedCallback)
Sets the callback method for after the dynamic colors have been applied.
Parameters | |
---|---|
onAppliedCallback |
DynamicColors.OnAppliedCallback |
Returns | |
---|---|
DynamicColorsOptions.Builder |
setPrecondition
public DynamicColorsOptions.Builder setPrecondition (DynamicColors.Precondition precondition)
Sets the precondition that decides if dynamic colors should be applied.
Parameters | |
---|---|
precondition |
DynamicColors.Precondition |
Returns | |
---|---|
DynamicColorsOptions.Builder |
setThemeOverlay
public DynamicColorsOptions.Builder setThemeOverlay (int themeOverlay)
Sets the resource ID of the theme overlay that provides dynamic color definition.
Parameters | |
---|---|
themeOverlay |
int |
Returns | |
---|---|
DynamicColorsOptions.Builder |