setColorSchemeParams

Sets CustomTabColorSchemeParams for the given colour scheme.

This allows specifying two different toolbar colours for light and dark schemes. It can be useful if ColorScheme.System is set: Custom Tabs will follow the system settings and apply the corresponding CustomTabColorSchemeParams "on the fly" when the settings change.

If there is no CustomTabColorSchemeParams for the current scheme, or a particular field of it is null, Custom Tabs will fall back to the defaults provided via setDefaultColorSchemeParams.

This method allows for the ColorScheme enum to be used.

Since

0.0.1

Parameters

scheme

A constant representing a color scheme (see setColorScheme). It should not be ColorScheme.System, because that represents a behavior rather than a particular color scheme.

params

See also


Sets CustomTabColorSchemeParams for the given colour scheme.

This allows specifying two different toolbar colours for light and dark schemes. It can be useful if ColorScheme.System is set: Custom Tabs will follow the system settings and apply the corresponding CustomTabColorSchemeParams "on the fly" when the settings change.

If there is no CustomTabColorSchemeParams for the current scheme, or a particular field of it is null, Custom Tabs will fall back to the defaults provided via setDefaultColorSchemeParams.

This method allows for the ColorScheme enum to be used, as well as DSL syntax to configure the CustomTabColorSchemeParams.

Since

0.0.1

Parameters

scheme

A constant representing a color scheme (see setColorScheme). It should not be ColorScheme.System, because that represents a behavior rather than a particular color scheme.

paramsInit

Block to be used to configure a CustomTabColorSchemeParams.

See also


fun CustomTabsIntent.Builder.setColorSchemeParams(scheme: ColorScheme, @ColorInt toolbarColor: Int? = null, @ColorInt secondaryToolbarColor: Int? = null, @ColorInt navigationBarColor: Int? = null, @ColorInt navigationBarDividerColor: Int? = null): CustomTabsIntent.Builder(source)

Sets CustomTabColorSchemeParams for the given colour scheme.

This allows specifying two different toolbar colours for light and dark schemes. It can be useful if ColorScheme.System is set: Custom Tabs will follow the system settings and apply the corresponding CustomTabColorSchemeParams "on the fly" when the settings change.

If there is no CustomTabColorSchemeParams for the current scheme, or a particular field of it is null, Custom Tabs will fall back to the defaults provided via setDefaultColorSchemeParams.

This method allows for the ColorScheme enum to be used, as well as named arguments to configure the CustomTabColorSchemeParams.

Since

0.0.1

Parameters

scheme

A constant representing a color scheme (see setColorScheme). It should not be ColorScheme.System, because that represents a behavior rather than a particular color scheme.

See also