Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

DayNightStyle

class DayNightStyle
androidx.car.widget.DayNightStyle

Specifies how the system UI should respond to day/night mode events.

Summary

Constants
static Int

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is light during the day and dark during the night.

static Int

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is dark during the day and light during the night.

static Int

Sets the color to be locked to a light variant during day and night.

static Int

Sets the color to be locked ot a dark variant during day and night.

Public constructors

Specifies how the system UI should respond to day/night mode events.

Constants

AUTO

static val AUTO: Int

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is light during the day and dark during the night.

This is the default behavior.

Value: 0

AUTO_INVERSE

static val AUTO_INVERSE: Int

Sets the foreground color to be automatically changed based on day/night mode, assuming the app content background is dark during the day and light during the night.

Value: 1

ALWAYS_LIGHT

static val ALWAYS_LIGHT: Int

Sets the color to be locked to a light variant during day and night.

Value: 2

ALWAYS_DARK

static val ALWAYS_DARK: Int

Sets the color to be locked ot a dark variant during day and night.

Value: 3

Public constructors

<init>

DayNightStyle()

Specifies how the system UI should respond to day/night mode events.