apply If Available
Deprecated
Use applyToActivityIfAvailable instead.
Applies dynamic colors to the given activity with the theme overlay designated by the theme attribute dynamicColorThemeOverlay
.
Parameters
activity
The target activity.
Deprecated
Use applyToActivityIfAvailable instead.
Applies dynamic colors to the given activity with the given theme overlay.
Parameters
activity
The target activity.
theme
The resource ID of the theme overlay that provides dynamic color definition.
open fun applyIfAvailable(@NonNull activity: Activity, @NonNull precondition: DynamicColors.Precondition)
Deprecated
Use applyToActivityIfAvailable instead.
Applies dynamic colors to the given activity with the theme overlay designated by the theme attribute dynamicColorThemeOverlay
according to the given precondition.
Parameters
activity
The target activity.
precondition
The precondition to decide if dynamic colors should be applied.