applyToActivityIfAvailable

Applies dynamic colors to the given activity.

Parameters

activity

The target activity.

See also


open fun applyToActivityIfAvailable(@NonNull activity: Activity, @NonNull dynamicColorsOptions: DynamicColorsOptions)

Applies dynamic colors to the given activity with DynamicColorsOptions provided.

Parameters

activity

The target activity.

dynamicColorsOptions

The dynamic colors options object that specifies the theme resource ID, precondition to decide if dynamic colors should be applied and the callback function for after dynamic colors have been applied.